-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlizb.vim
More file actions
42 lines (30 loc) · 1009 Bytes
/
lizb.vim
File metadata and controls
42 lines (30 loc) · 1009 Bytes
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
" Syntax file for example Lisp-like language
" Save as: syntax/lizb.vim
if exists("b:current_syntax")
finish
endif
" ------------------------
" Basic definitions
" ------------------------
" Comments: everything after # to end of line
syntax match lizbComment "#.*$"
" Strings: double-quoted, allow escaped quotes
syntax region lizbString start=/"/ skip=/\\"/ end=/"/
" Numbers: simple integers
syntax match lizbNumber "\v[-+]?\d+"
" Core keywords / special forms
syntax keyword lizbKeyword let fun map filter reduce loop list if when range global and or not =
" js interop: js/<something>
syntax match lizbJsInterop "\vjs\/[A-Za-z0-9_.]*"
" Parens as delimiters
syntax match lizbParen "[()]"
" ------------------------
" Highlight links
" ------------------------
hi def link lizbComment Comment
hi def link lizbString String
hi def link lizbNumber Number
hi def link lizbKeyword Keyword
hi def link lizbJsInterop Function
hi def link lizbParen Delimiter
let b:current_syntax = "lizb"