-
Notifications
You must be signed in to change notification settings - Fork 65
/
lua.vim
84 lines (75 loc) · 1.92 KB
/
lua.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
syntax keyword luaMyKeyword
\ self
syntax keyword luaKeyword
\ _VERSION
\ dofile
\ getfenv
\ getmetatable
\ ipairs
\ load
\ loadfile
\ loadstring
\ next
\ pairs
\ print
\ rawequal
\ rawget
\ rawlen
\ rawset
\ select
\ setfenv
\ setmetatable
\ tonumber
\ tostring
\ type
\ unpack
syntax match luaSpecialFunctions /table\.concat/
syntax match luaSpecialFunctions /table\.foreach/
syntax match luaSpecialFunctions /table\.foreachi/
syntax match luaSpecialFunctions /table\.sort/
syntax match luaSpecialFunctions /table\.insert/
syntax match luaSpecialFunctions /table\.remove/
if v:false
syntax match luaSpecialFunctions /string\.byte/
syntax match luaSpecialFunctions /string\.char/
syntax match luaSpecialFunctions /string\.dump/
syntax match luaSpecialFunctions /string\.find/
syntax match luaSpecialFunctions /string\.format/
syntax match luaSpecialFunctions /string\.gmatch/
syntax match luaSpecialFunctions /string\.gsub/
syntax match luaSpecialFunctions /string\.len/
syntax match luaSpecialFunctions /string\.lower/
syntax match luaSpecialFunctions /string\.upper/
syntax match luaSpecialFunctions /string\.match/
syntax match luaSpecialFunctions /string\.rep/
syntax match luaSpecialFunctions /string\.reverse/
syntax match luaSpecialFunctions /string\.sub/
endif
syntax keyword luaMetatableEvents
\ __index
\ __newindex
\ __mode
\ __call
\ __metatable
\ __tostring
\ __len
\ __pairs
\ __ipairs
\ __gc
syntax keyword luaMetatableArithmetic
\ __unm
\ __add
\ __sub
\ __mul
\ __div
\ __mod
\ __div
\ __idiv
\ __mod
\ __pow
\ __concat
syntax keyword luaMetatableEquivalence
\ __eq
\ __lt
\ __le
syntax match luaFunctionCall display /\<\(function\)\@!\w\+(/he=e-1