aboutsummaryrefslogtreecommitdiffstats
path: root/queries/lua
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-08-14 13:33:55 -0500
committerGitHub <noreply@github.com>2021-08-14 13:33:55 -0500
commit460a26ef3218057a544b3fd6697e979e6bad648d (patch)
tree47fa24962b33c347d01cf8709468520e2f4d44e5 /queries/lua
parentAdd comment highlighting for keywords in Haskell (#1695) (diff)
downloadnvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.tar
nvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.tar.gz
nvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.tar.bz2
nvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.tar.lz
nvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.tar.xz
nvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.tar.zst
nvim-treesitter-460a26ef3218057a544b3fd6697e979e6bad648d.zip
Lua: highlight uppercase variables as constants (#1690)
Diffstat (limited to 'queries/lua')
-rw-r--r--queries/lua/highlights.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm
index ba793524f..30524135d 100644
--- a/queries/lua/highlights.scm
+++ b/queries/lua/highlights.scm
@@ -115,6 +115,8 @@
] @boolean
(nil) @constant.builtin
(spread) @constant ;; "..."
+((identifier) @constant
+ (#match? @constant "^[A-Z][A-Z_0-9]*$"))
;; Functions
(function [(function_name) (identifier)] @function)