summaryrefslogtreecommitdiffstats
path: root/tv/2configs/vim.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-12 21:14:03 +0200
committertv <tv@krebsco.de>2016-06-12 21:14:03 +0200
commite079214f431709170b82eaa47be78725a57c04a0 (patch)
tree41863ede7df38112ffc358214915c6894101d2db /tv/2configs/vim.nix
parent29442eda7c864265ccf23df0b350572d5527dd86 (diff)
tv nix.vim Nix{ID,Other}: init
Diffstat (limited to 'tv/2configs/vim.nix')
-rw-r--r--tv/2configs/vim.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 826c2d4ca..12eab46ed 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -211,9 +211,8 @@ let
nix.vim = pkgs.writeText "nix.vim" ''
setf nix
- syn match NixCode /./
-
" Ref <nix/src/libexpr/lexer.l>
+ syn match NixID /[a-zA-Z\_][a-zA-Z0-9\_\'\-]*/
syn match NixINT /\<[0-9]\+\>/
syn match NixPATH /[a-zA-Z0-9\.\_\-\+]*\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/
syn match NixHPATH /\~\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/
@@ -231,6 +230,7 @@ let
\ end="'''"
syn cluster NixStrings contains=NixSTRING,NixIND_STRING
+ syn match NixOther /[():/;=.,?\[\]]/
syn match NixCommentMatch /\(^\|\s\)#.*/
syn region NixCommentRegion start="/\*" end="\*/"
@@ -241,6 +241,7 @@ let
hi link NixCommentMatch NixComment
hi link NixCommentRegion NixComment
+ hi link NixID NixCode
hi link NixINT NixData
hi link NixPATH NixData
hi link NixHPATH NixData
@@ -251,6 +252,7 @@ let
hi link NixEnter NixCode
hi link NixExit NixData
+ hi link NixOther NixCode
hi link NixQuote NixData
hi link NixQuote2 NixQuote
hi link NixQuote3 NixQuote