mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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
|
||||
|
||||
"return" @keyword.return
|
||||
|
|
@ -140,13 +128,23 @@
|
|||
|
||||
(identifier) @variable
|
||||
|
||||
;; Constants
|
||||
((identifier) @variable.builtin
|
||||
(#match? @variable.builtin "self"))
|
||||
|
||||
(vararg_expression) @constant
|
||||
;; Constants
|
||||
|
||||
((identifier) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
|
||||
(vararg_expression) @constant
|
||||
|
||||
(nil) @constant.builtin
|
||||
|
||||
[
|
||||
(false)
|
||||
(true)
|
||||
] @boolean
|
||||
|
||||
;; Tables
|
||||
|
||||
(field name: (identifier) @field)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue