about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2014-02-07 01:49:16 +0100
committerDomen Kožar <domen@dev.si>2014-02-07 11:06:41 +0100
commit4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a (patch)
tree68e6130106bc5eb4e5aba4fb2dcf86a45317329a /pkgs/applications/editors
parent56d26d04ece7c119664ac82290680933bb1d43fc (diff)
downloadnixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.tar
nixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.tar.gz
nixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.tar.bz2
nixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.tar.lz
nixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.tar.xz
nixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.tar.zst
nixlib-4f3d4c55ffa45b5216d1d3a8df0a446cd17f0b0a.zip
vim-ft: match attributes with dash and set nix as ft
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/vim/ft-nix-support.patch8
1 files 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 0e73162d33ef..b2ac423092e5 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 <marco-oweber@gmx.de>
@@ -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"