Mercurial > vim
annotate runtime/syntax/latte.vim @ 19767:4ee37e23b782
Added tag v8.2.0439 for changeset aa4cbdb676cd3dde5e939ec5cb078e2a7345cd6c
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 23 Mar 2020 23:00:05 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 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 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
10 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
11 if exists("b:current_syntax") |
7 | 12 finish |
13 endif | |
14 | |
15 syn match latteError "[{}\\]" | |
16 syn match latteOther "\\{" | |
17 syn match latteOther "\\}" | |
18 syn match latteOther "\\\\" | |
19 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
20 setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ |
7 | 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. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
66 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
67 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
68 hi def link latteSyntax Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link latteVar Function |
7 | 70 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link latteString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link latteQuote String |
7 | 73 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link latteDelimiter Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
75 hi def link latteOperator Operator |
7 | 76 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link latteComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
78 hi def link latteError Error |
7 | 79 |
80 | |
81 let b:current_syntax = "latte" |