citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

nix.vim (1522B)


      1 " Vim syntax file
      2 " Language:	nix
      3 " Maintainer:	Marc Weber <marco-oweber@gmx.de>
      4 "               Modify and commit if you feel that way
      5 " Last Change:	2007 Dec
      6 
      7 " Quit when a (custom) syntax file was already loaded
      8 if exists("b:current_syntax")
      9   finish
     10 endif
     11 
     12 syn keyword	nixKeyword	let throw inherit import true false null with
     13 syn keyword	nixConditional	if else then
     14 syn keyword     nixBrace        ( ) { } =
     15 syn keyword     nixBuiltin         __currentSystem __currentTime __isFunction __getEnv __trace __toPath __pathExists 
     16   \ __readFile __toXML __toFile __filterSource __attrNames __getAttr __hasAttr __isAttrs __listToAttrs __isList 
     17   \ __head __tail __add __sub __lessThan __substring __stringLength
     18 
     19 syn match nixAttr "\w\+\ze\s*="
     20 syn match nixFuncArg "\zs\w\+\ze\s*:"
     21 syn region nixStringParam start=+\${+ end=+}+
     22 syn region nixMultiLineComment start=+/\*+ skip=+\\"+ end=+\*/+
     23 syn match  nixEndOfLineComment "#.*$"
     24 syn region nixStringIndented start=+''+ skip=+'''\|''${\|"+ end=+''+ contains=nixStringParam
     25 syn region nixString         start=+"+ skip=+\\"+ end=+"+ contains=nixStringParam
     26 
     27 hi def link nixKeyword       Keyword
     28 hi def link nixConditional   Conditional
     29 hi def link nixBrace         Special
     30 hi def link nixString        String
     31 hi def link nixStringIndented String
     32 hi def link nixBuiltin       Special
     33 hi def link nixStringParam   Macro
     34 hi def link nixMultiLineComment Comment
     35 hi def link nixEndOfLineComment Comment
     36 hi def link nixAttr        Identifier
     37 hi def link nixFuncArg     Identifier