From a943661be809c837719146671809e0286a090a5b Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Sat, 21 Jan 2023 10:41:21 +0100 Subject: [PATCH] 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. --- queries/scala/highlights.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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$"))