mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
queries(lua): add more keywords related to variable/function builtins, debug, and coroutines
This commit is contained in:
parent
2170a36416
commit
581fc14cea
1 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue