vim ft: address the problem with broken highlighting in big files
It seems Vim needs to be instructed how to scan for the begining of the multiline statements to correctly and efficiently highlight lanuages. See :help syn-sync-maxlines
This commit is contained in:
parent
77817b7638
commit
5c9dc83bb9
@ -23,7 +23,7 @@ new file mode 100644
|
||||
index 0000000..a2f9918
|
||||
--- /dev/null
|
||||
+++ b/runtime/syntax/nix.vim
|
||||
@@ -0,0 +1,42 @@
|
||||
@@ -0,0 +1,47 @@
|
||||
+" Vim syntax file
|
||||
+" Language: nix
|
||||
+" Maintainer: Marc Weber <marco-oweber@gmx.de>
|
||||
@ -68,3 +68,8 @@ index 0000000..a2f9918
|
||||
+hi def link nixFuncArg Identifier
|
||||
+
|
||||
+let b:current_syntax = "nix"
|
||||
+
|
||||
+" scan backwards to find begining of multiline statements
|
||||
+syn sync ccomment nixMultiLineComment minlines=10 maxlines=500
|
||||
+syn sync ccomment nixStringIndented minlines=10 maxlines=500
|
||||
+syn sync ccomment nixString maxlines=10
|
||||
|
Loading…
Reference in New Issue
Block a user