From 5c9dc83bb909a07e830f0364ba65e0fe0d59b230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 12 Feb 2014 14:39:24 +0100 Subject: [PATCH] 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 --- pkgs/applications/editors/vim/ft-nix-support.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vim/ft-nix-support.patch b/pkgs/applications/editors/vim/ft-nix-support.patch index b2ac423092e5..ed508784813c 100644 --- a/pkgs/applications/editors/vim/ft-nix-support.patch +++ b/pkgs/applications/editors/vim/ft-nix-support.patch @@ -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 @@ -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