tv vim-syntax-nix-nested: add writer{Ext,Name}
This commit is contained in:
parent
cdb548ac30
commit
1c4810bd40
@ -250,6 +250,9 @@ let {
|
|||||||
def = k: ''${k}[ \t\r\n]*='';
|
def = k: ''${k}[ \t\r\n]*='';
|
||||||
writer = k: ''write${k}[^ \t\r\n]*[ \t\r\n]*\("[^"]*"\|[a-z]\+\)'';
|
writer = k: ''write${k}[^ \t\r\n]*[ \t\r\n]*\("[^"]*"\|[a-z]\+\)'';
|
||||||
|
|
||||||
|
writerExt = k: writerName ''[^"]*\.${k}'';
|
||||||
|
writerName = k: ''write[^ \t\r\n]*[ \t\r\n]*"${k}"'';
|
||||||
|
|
||||||
in {
|
in {
|
||||||
c = {};
|
c = {};
|
||||||
cabal = {};
|
cabal = {};
|
||||||
@ -257,7 +260,7 @@ let {
|
|||||||
haskell = {};
|
haskell = {};
|
||||||
jq.extraStart = alts [
|
jq.extraStart = alts [
|
||||||
(writer "Jq")
|
(writer "Jq")
|
||||||
''write[^ \t\r\n]*[ \t\r\n]*"[^"]*\.jq"''
|
(writerExt "jq")
|
||||||
];
|
];
|
||||||
javascript.extraStart = ''/\* js \*/'';
|
javascript.extraStart = ''/\* js \*/'';
|
||||||
lua = {};
|
lua = {};
|
||||||
@ -287,8 +290,10 @@ let {
|
|||||||
(writer (alts (map capitalize shells)))
|
(writer (alts (map capitalize shells)))
|
||||||
];
|
];
|
||||||
yaml = {};
|
yaml = {};
|
||||||
vim.extraStart =
|
vim.extraStart = alts [
|
||||||
''write[^ \t\r\n]*[ \t\r\n]*"\(\([^"]*\.\)\?vimrc\|[^"]*\.vim\)"'';
|
(writerExt "vim")
|
||||||
|
(writerName ''\([^"]*\.\)\?vimrc'')
|
||||||
|
];
|
||||||
xdefaults = {};
|
xdefaults = {};
|
||||||
}))}
|
}))}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user