mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
fix(lua): restore precedence for @variable.builtin and @constant.builtin
This commit is contained in:
parent
ccb55be88f
commit
6ece0ca4e6
1 changed files with 12 additions and 14 deletions
|
|
@ -1,15 +1,3 @@
|
||||||
;;; Builtins
|
|
||||||
|
|
||||||
[
|
|
||||||
(false)
|
|
||||||
(true)
|
|
||||||
] @boolean
|
|
||||||
|
|
||||||
(nil) @constant.builtin
|
|
||||||
|
|
||||||
((identifier) @variable.builtin
|
|
||||||
(#match? @variable.builtin "self"))
|
|
||||||
|
|
||||||
;; Keywords
|
;; Keywords
|
||||||
|
|
||||||
"return" @keyword.return
|
"return" @keyword.return
|
||||||
|
|
@ -140,13 +128,23 @@
|
||||||
|
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
;; Constants
|
((identifier) @variable.builtin
|
||||||
|
(#match? @variable.builtin "self"))
|
||||||
|
|
||||||
(vararg_expression) @constant
|
;; Constants
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
|
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||||
|
|
||||||
|
(vararg_expression) @constant
|
||||||
|
|
||||||
|
(nil) @constant.builtin
|
||||||
|
|
||||||
|
[
|
||||||
|
(false)
|
||||||
|
(true)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
;; Tables
|
;; Tables
|
||||||
|
|
||||||
(field name: (identifier) @field)
|
(field name: (identifier) @field)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue