-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkoda.vim
51 lines (43 loc) · 1.69 KB
/
koda.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
" Vim syntax file
" Language: koda
if exists("b:current_syntax")
finish
endif
syn keyword kodaConstant nil sant falskt
syn keyword kodaLocal lokal
syn keyword kodaOperator och inte eller
syn keyword kodaStatement bryt ge
syn keyword kodaFunction funktion
syn keyword kodaFlow upprepa medan tills gör för i slut
syn keyword kodaCond om utför annars annarsom
syn match kodaEscape contained /\\./
syn region kodaString start="\"" end="\"" contains=kodaEscape
syn region kodaString start="'" end="'" contains=kodaEscape
syn keyword kodaCommentTodo contained TODO FIXME
syn cluster kodaCommentGrp contains=kodaCommentTodo
syn region kodaComment start="--" skip="\\$" end="$" keepend contains=@kodaCommentGrp
syn region kodaComment start="--\[" end="--]" contains=@kodaCommentGrp
syn match kodaFuncCall "\I\+\s*\((\)\@="
syn match kodaIdent "\I\+\s*\(=\s\)\@="
syn match kodaQuantPlus ">=\|<=\|==\|\*\|+\|-\(-\)\@!\|\/\|\.\.\|<\|>\|\~=\|%"
syn match kodaDict "\I\+\(\.\)\@="
syn match kodaInt '\d\+'
syn match kodaInt '[-+]\d\+'
syn match kodaFloat '[-+]\d\+\.\d*'
hi def link kodaConstant Boolean
hi def link kodaLocal StorageClass
hi def link kodaOperator Operator
hi def link kodaStatement Statement
hi def link kodaFunction Statement
hi def link kodaFlow Repeat
hi def link kodaCond Conditional
hi def link kodaEscape Special
hi def link kodaString String
hi def link kodaFuncCall Function
hi def link kodaIdent Structure
hi def link kodaQuantPlus Special
hi def link kodaDict Structure
hi def link kodaInt Number
hi def link kodaFloat Float
hi def link kodaCommentTodo Todo
hi def link kodaComment Comment