From d29f2d1cc8b92f93a238347691b07faa02be44fa Mon Sep 17 00:00:00 2001 From: Felix Tenley Date: Tue, 20 Oct 2020 15:47:53 +0200 Subject: [PATCH] fix(neovim): add missing scripts.vim --- home/editors/neovim/default.nix | 2 ++ home/editors/neovim/scripts.vim | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/home/editors/neovim/default.nix b/home/editors/neovim/default.nix index f1b3c15..a811fa7 100644 --- a/home/editors/neovim/default.nix +++ b/home/editors/neovim/default.nix @@ -80,4 +80,6 @@ in { withNodeJs = true; withPython = false; }; + + xdg.configFile."nvim/scripts.vim".source = ./scripts.vim; } diff --git a/home/editors/neovim/scripts.vim b/home/editors/neovim/scripts.vim index 78f98fd..3e4cfb3 100644 --- a/home/editors/neovim/scripts.vim +++ b/home/editors/neovim/scripts.vim @@ -10,13 +10,13 @@ if getline(1) =~ '^#!.*nix-shell' call dist#ft#SetFileTypeSH(s:command) elseif s:command == 'zsh' set ft=zsh - elseif s:command =~ '^gnumake\d*\>' + elseif s:command =~ 'make\>' set ft=make - elseif s:command =~ '^nodejs' + elseif s:command =~ '^node\(js\)\=\>\|^js\>' set ft=javascript - elseif s:command =~ '^ghc' + elseif s:command =~ '^ghci' set ft=haskell - elseif s:command =~ '^python' + elseif s:command =~ 'python' set ft=python endif endif