neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

latte.vim (3511B)


      1 " Vim syntax file
      2 " Language:	Latte
      3 " Maintainer:	Nick Moffitt, <nick@zork.net>
      4 " Last Change:	14 June, 2000
      5 "
      6 " Notes:
      7 " I based this on the TeX and Scheme syntax files (but mostly scheme).
      8 " See http://www.latte.org for info on the language.
      9 
     10 " quit when a syntax file was already loaded
     11 if exists("b:current_syntax")
     12  finish
     13 endif
     14 
     15 syn match latteError "[{}\\]"
     16 syn match latteOther "\\{"
     17 syn match latteOther "\\}"
     18 syn match latteOther "\\\\"
     19 
     20 setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_
     21 
     22 syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther
     23 syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther
     24 syn region latteString	start=+\\"+ skip=+\\\\"+ end=+\\"+
     25 
     26 syn region latteGroup	matchgroup=Delimiter start="{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax
     27 
     28 syn region latteUnquote matchgroup=Delimiter start="\\,{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax
     29 syn region latteSplice matchgroup=Delimiter start="\\,@{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax
     30 syn region latteQuote matchgroup=Delimiter start="\\'{" skip="\\[{}]" matchgroup=Delimiter end="}"
     31 syn region latteQuote matchgroup=Delimiter start="\\`{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=latteUnquote,latteSplice
     32 
     33 syn match  latteOperator   '\\/'
     34 syn match  latteOperator   '='
     35 
     36 syn match  latteComment	"\\;.*$"
     37 
     38 " This was gathered by slurping in the index.
     39 
     40 syn keyword latteSyntax __FILE__ __latte-version__ contained
     41 syn keyword latteSyntax _bal-tag _pre _tag add and append apply back contained
     42 syn keyword latteSyntax caar cadr car cdar cddr cdr ceil compose contained
     43 syn keyword latteSyntax concat cons def defmacro divide downcase contained
     44 syn keyword latteSyntax empty? equal? error explode file-contents contained
     45 syn keyword latteSyntax floor foreach front funcall ge?  getenv contained
     46 syn keyword latteSyntax greater-equal? greater? group group? gt? html contained
     47 syn keyword latteSyntax if include lambda le? length less-equal? contained
     48 syn keyword latteSyntax less? let lmap load-file load-library lt?  macro contained
     49 syn keyword latteSyntax member?  modulo multiply not nth operator? contained
     50 syn keyword latteSyntax or ordinary quote process-output push-back contained
     51 syn keyword latteSyntax push-front quasiquote quote random rdc reverse contained
     52 syn keyword latteSyntax set!  snoc splicing unquote strict-html4 contained
     53 syn keyword latteSyntax string-append string-ge?  string-greater-equal? contained
     54 syn keyword latteSyntax string-greater?  string-gt?  string-le? contained
     55 syn keyword latteSyntax string-less-equal?  string-less?  string-lt? contained
     56 syn keyword latteSyntax string?  subseq substr subtract  contained
     57 syn keyword latteSyntax upcase useless warn while zero?  contained
     58 
     59 
     60 " If it's good enough for scheme...
     61 
     62 syn sync match matchPlace grouphere NONE "^[^ \t]"
     63 " ... i.e. synchronize on a line that starts at the left margin
     64 
     65 " Define the default highlighting.
     66 " Only when an item doesn't have highlighting yet
     67 
     68 hi def link latteSyntax		Statement
     69 hi def link latteVar			Function
     70 
     71 hi def link latteString		String
     72 hi def link latteQuote			String
     73 
     74 hi def link latteDelimiter		Delimiter
     75 hi def link latteOperator		Operator
     76 
     77 hi def link latteComment		Comment
     78 hi def link latteError			Error
     79 
     80 
     81 let b:current_syntax = "latte"