aboutsummaryrefslogtreecommitdiffstats
path: root/queries/scala
diff options
context:
space:
mode:
authorChris Kipp <ckipp@pm.me>2023-01-21 10:41:21 +0100
committerChristian Clason <c.clason@uni-graz.at>2023-01-21 17:59:30 +0100
commita943661be809c837719146671809e0286a090a5b (patch)
tree24779c8787dc3bcbcf83103b7360774178a6544a /queries/scala
parentfeat: add htmldjango (diff)
downloadnvim-treesitter-a943661be809c837719146671809e0286a090a5b.tar
nvim-treesitter-a943661be809c837719146671809e0286a090a5b.tar.gz
nvim-treesitter-a943661be809c837719146671809e0286a090a5b.tar.bz2
nvim-treesitter-a943661be809c837719146671809e0286a090a5b.tar.lz
nvim-treesitter-a943661be809c837719146671809e0286a090a5b.tar.xz
nvim-treesitter-a943661be809c837719146671809e0286a090a5b.tar.zst
nvim-treesitter-a943661be809c837719146671809e0286a090a5b.zip
refactor(scala): update scala highlights for uppercase identifiers
This is a small change that comes from the discussion we had in https://github.com/tree-sitter/tree-sitter-scala/discussions/168#discussioncomment-4718624. The idea here is that we're sort of making an assumption on what an uppercase identifier is in Scala and more times than not, it's actually a `@type`. So this changes the `@constant` capture to a `@type` one. You can find the full context in the linked discussion.
Diffstat (limited to 'queries/scala')
-rw-r--r--queries/scala/highlights.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/queries/scala/highlights.scm b/queries/scala/highlights.scm
index 2df071a5a..f600dc185 100644
--- a/queries/scala/highlights.scm
+++ b/queries/scala/highlights.scm
@@ -241,7 +241,7 @@
(operator_identifier) @operator
-((identifier) @constant (#lua-match? @constant "^[A-Z]"))
+((identifier) @type (#lua-match? @type "^[A-Z]"))
((identifier) @variable.builtin
(#lua-match? @variable.builtin "^this$"))