diff --git a/flake.lock b/flake.lock index 0714e4d..549f5d4 100644 --- a/flake.lock +++ b/flake.lock @@ -104,11 +104,11 @@ ] }, "locked": { - "lastModified": 1601584113, - "narHash": "sha256-4gLn43KG5KzJatEul+/TfsiMnj3FK3ZU6VMdXdPpdRY=", + "lastModified": 1602339342, + "narHash": "sha256-Qh+BDMfBmMSnhEhXSyF539aKGUGbq1IKBmtghiG/VhY=", "owner": "nix-community", "repo": "home-manager", - "rev": "9ff2188c5d2c65b20ded3f2e7a759319866313d3", + "rev": "b5847455066d0191cebd6b140531cc154443e316", "type": "github" }, "original": { @@ -120,11 +120,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1601171649, - "narHash": "sha256-G3RUAi2DUq6r3ntASLS+LZC/Eamot55W1+xmBOgEh3M=", + "lastModified": 1602066138, + "narHash": "sha256-aV0PWKhVYQNLQuFW2qfBXa3JWmPPKSHFJ65ac83JMzE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "84d74ae9c9cbed73274b8e4e00be14688ffc93fe", + "rev": "420f89ceb267b461eed5d025b6c3c0e57703cc5c", "type": "github" }, "original": { @@ -136,11 +136,11 @@ }, "nur": { "locked": { - "lastModified": 1601698374, - "narHash": "sha256-lSLCuIHPj1/1CUnaqisE+CFo3xHfF0iEobvCUSrR7aA=", + "lastModified": 1602402297, + "narHash": "sha256-JtkPhpNVAW+e+i4Wi2cUQL9abDZggEoKxzUUGGZD1aQ=", "owner": "nix-community", "repo": "NUR", - "rev": "c1f6e74466f1db1f77cc18162e042a872abc3126", + "rev": "1cc609428be16e52d0db637dea71bd012e039714", "type": "github" }, "original": { diff --git a/home/editors/neovim/scripts.vim b/home/editors/neovim/scripts.vim new file mode 100644 index 0000000..78f98fd --- /dev/null +++ b/home/editors/neovim/scripts.vim @@ -0,0 +1,23 @@ +if did_filetype() + finish +endif +if getline(1) =~ '^#!.*nix-shell' + let s:matches = matchlist(getline(2), '^#!.*nix-shell -i \([^ \t\n]\+\)') + let s:command = s:matches[1] + echo s:command + if s:command != '' + if s:command =~# '^\(bash\d*\|\|ksh\d*\|sh\)\>' + call dist#ft#SetFileTypeSH(s:command) + elseif s:command == 'zsh' + set ft=zsh + elseif s:command =~ '^gnumake\d*\>' + set ft=make + elseif s:command =~ '^nodejs' + set ft=javascript + elseif s:command =~ '^ghc' + set ft=haskell + elseif s:command =~ '^python' + set ft=python + endif + endif +endif