queries(lua): add more keywords related to variable/function builtins, debug, and coroutines

This commit is contained in:
Amaan Qureshi 2023-03-16 03:41:31 -04:00
parent 2170a36416
commit 581fc14cea

View file

@ -128,7 +128,10 @@
(identifier) @variable
((identifier) @variable.builtin
(#any-of? @variable.builtin "self" "string" "table" "vim"))
(#any-of? @variable.builtin "_G" "_VERSION" "debug" "io" "jit" "math" "os" "package" "self" "string" "table" "utf8"))
((identifier) @keyword.coroutine
(#eq? @keyword.coroutine "coroutine"))
(variable_list
attribute: (attribute
@ -185,8 +188,11 @@
;; built-in functions in Lua 5.1
"assert" "collectgarbage" "dofile" "error" "getfenv" "getmetatable" "ipairs"
"load" "loadfile" "loadstring" "module" "next" "pairs" "pcall" "print"
"rawequal" "rawget" "rawset" "require" "select" "setfenv" "setmetatable"
"tonumber" "tostring" "type" "unpack" "xpcall"))
"rawequal" "rawget" "rawlen" "rawset" "require" "select" "setfenv" "setmetatable"
"tonumber" "tostring" "type" "unpack" "xpcall"
"__add" "__band" "__bnot" "__bor" "__bxor" "__call" "__concat" "__div" "__eq" "__gc"
"__idiv" "__index" "__le" "__len" "__lt" "__metatable" "__mod" "__mul" "__name" "__newindex"
"__pairs" "__pow" "__shl" "__shr" "__sub" "__tostring" "__unm"))
;; Others