mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
Lua: highlight uppercase variables as constants (#1690)
This commit is contained in:
parent
159ca7b35c
commit
9c5dd185c4
1 changed files with 2 additions and 0 deletions
|
|
@ -115,6 +115,8 @@
|
||||||
] @boolean
|
] @boolean
|
||||||
(nil) @constant.builtin
|
(nil) @constant.builtin
|
||||||
(spread) @constant ;; "..."
|
(spread) @constant ;; "..."
|
||||||
|
((identifier) @constant
|
||||||
|
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||||
|
|
||||||
;; Functions
|
;; Functions
|
||||||
(function [(function_name) (identifier)] @function)
|
(function [(function_name) (identifier)] @function)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue