summaryrefslogtreecommitdiffstats
path: root/tv/2configs/vim.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-12 21:28:31 +0200
committertv <tv@krebsco.de>2016-06-12 21:29:07 +0200
commitac3b87b9a62929a81d2a275b808681352cc3c10e (patch)
tree547fadceb0e5e16901ef00470cac441c59f1adb1 /tv/2configs/vim.nix
parent8237c8606ec67154bb084c4c47c8538a3cdb6455 (diff)
tv nix.vim: transparent nix_*_region_* and curly blocks
Diffstat (limited to 'tv/2configs/vim.nix')
-rw-r--r--tv/2configs/vim.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 9a8471330..85045332f 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -279,6 +279,7 @@ let
\ end='"'
\ contained
\ contains=@nix_${lang}_syntax
+ \ transparent
syn region nix_${lang}_region_IND_STRING
\ matchgroup=NixIND_STRING
@@ -287,6 +288,7 @@ let
\ end="'''"
\ contained
\ contains=@nix_${lang}_syntax
+ \ transparent
syn cluster nix_ind_strings
\ add=nix_${lang}_region_IND_STRING
@@ -305,22 +307,24 @@ let
''write[^ \t\r\n]*[ \t\r\n]*"\(\([^"]*\.\)\?vimrc\|[^"]*\.vim\)"'';
})}
- " Clear syntax that interferes with NixBlock.
- " TODO redefine NixBlock so syntax don't have to be cleared
- syn clear shOperator shSetList shVarAssign
+ " Clear syntax that interferes with nixINSIDE_DOLLAR_CURLY.
+ syn clear shVarAssign
- syn region NixBlock
+ syn region nixINSIDE_DOLLAR_CURLY
\ matchgroup=NixEnter
\ start="[$]{"
\ end="}"
\ contains=TOP
\ containedin=@nix_has_dollar_curly
+ \ transparent
- syn region NixBlockHack
+ syn region nix_inside_curly
\ matchgroup=NixEnter
\ start="{"
\ end="}"
\ contains=TOP
+ \ containedin=nixINSIDE_DOLLAR_CURLY,nix_inside_curly
+ \ transparent
syn match NixQuote /'''\([''$']\|\\.\)/he=s+2
\ containedin=@nix_ind_strings