diff options
author | tv <tv@krebsco.de> | 2016-06-12 16:33:39 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-06-12 16:36:39 +0200 |
commit | 66bcbc56ea270eec5fb362eac0fc4725a946ee08 (patch) | |
tree | 6b24f3ebd627f01dfc4a1c0b59951b6c8d1cac28 /tv | |
parent | fb8be5838adfe58fc5d13235ac82022cbdb8f6e4 (diff) |
tv nix.vim: don't highlight sigils
Diffstat (limited to 'tv')
-rw-r--r-- | tv/2configs/vim.nix | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 0d87d97af..826c2d4ca 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -264,30 +264,32 @@ let ]; sigil = ''\(${concatStringsSep ''\|'' startAlts}\)[ \t\r\n]*''; in /* vim */ '' - syn include @${lang}Syntax syntax/${lang}.vim + syn include @nix_${lang}_syntax syntax/${lang}.vim unlet b:current_syntax - syn region ${lang}Block_NixSTRING - \ matchgroup=NixExit - \ extend - \ start='${replaceStrings ["'"] ["\\'"] sigil}"' + syn match nix_${lang}_sigil + \ X${replaceStrings ["X"] ["\\X"] sigil}\ze\('''\|"\)X + \ nextgroup=nix_${lang}_region + \ transparent + + syn region nix_${lang}_region + \ matchgroup=NixSTRING + \ start='"' \ skip='\\"' \ end='"' - \ contains=@${lang}Syntax + \ contained + \ contains=@nix_${lang}_syntax - syn region ${lang}Block_NixIND_STRING - \ matchgroup=NixExit - \ extend - \ start="${replaceStrings ["\""] ["\\\""] sigil}'''" + syn region nix_${lang}_region + \ matchgroup=NixIND_STRING + \ start="'''" \ skip="'''\('\|[$]\|\\[nrt]\)" \ end="'''" - \ contains=@${lang}Syntax + \ contained + \ contains=@nix_${lang}_syntax syn cluster NixSubLangs - \ add=@${lang}Syntax,${lang}Block_NixSTRING,${lang}Block_NixIND_STRING - - hi link ${lang}Block_NixSTRING Statement - hi link ${lang}Block_NixIND_STRING Statement + \ add=nix_${lang}_region,@nix_${lang}_syntax '') { c = {}; cabal = {}; |