From 4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 7 Feb 2014 01:49:16 +0100 Subject: [PATCH] vim-ft: match attributes with dash and set nix as ft --- pkgs/applications/editors/vim/ft-nix-support.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vim/ft-nix-support.patch b/pkgs/applications/editors/vim/ft-nix-support.patch index 0e73162d33e..b2ac423092e 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,40 @@ +@@ -0,0 +1,42 @@ +" Vim syntax file +" Language: nix +" Maintainer: Marc Weber @@ -46,8 +46,8 @@ index 0000000..a2f9918 + \ __readFile __toXML __toFile __filterSource __attrNames __getAttr __hasAttr __isAttrs __listToAttrs __isList + \ __head __tail __add __sub __lessThan __substring __stringLength + -+syn match nixAttr "\w\+\ze\s*=" -+syn match nixFuncArg "\zs\w\+\ze\s*:" ++syn match nixAttr "[a-zA-Z0-9-_]\+\ze\s*=" ++syn match nixFuncArg "\zs[a-zA-Z0-9-_]\+\ze\s*:" +syn region nixStringParam start=+\${+ end=+}+ +syn region nixMultiLineComment start=+/\*+ skip=+\\"+ end=+\*/+ +syn match nixEndOfLineComment "#.*$" @@ -66,3 +66,5 @@ index 0000000..a2f9918 +hi def link nixEndOfLineComment Comment +hi def link nixAttr Identifier +hi def link nixFuncArg Identifier ++ ++let b:current_syntax = "nix"