aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaehwang Jung <tomtomjhj@gmail.com>2024-03-16 14:20:55 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-03-16 20:51:16 +0800
commit5d75359a9ae20c492f96e6591e3a9e229d320c87 (patch)
treeb169556393621efcb1a6d596b8d7002bbd165f6c
parentfeat(highlights)!: `@keyword.storage` → `@keyword.modifier` (diff)
downloadnvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.tar
nvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.tar.gz
nvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.tar.bz2
nvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.tar.lz
nvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.tar.xz
nvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.tar.zst
nvim-treesitter-5d75359a9ae20c492f96e6591e3a9e229d320c87.zip
feat(highlights)!: remove non-keyword `@type.qualifier`
* blueprint: Don't specially highlight template_name_qualifier. This is similar to inheritance base class. Other languages don't highlight them specially. * eds: `@type` for all `*Type` keys * chatito: `@attribute` for variation
-rw-r--r--CONTRIBUTING.md1
-rw-r--r--queries/blueprint/highlights.scm3
-rw-r--r--queries/chatito/highlights.scm2
-rw-r--r--queries/eds/highlights.scm16
4 files changed, 2 insertions, 20 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1f80341e0..b024961a9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -139,7 +139,6 @@ As languages differ quite a lot, here is a set of captures available to you when
@type ; type or class definitions and annotations
@type.builtin ; built-in types
@type.definition ; identifiers in type definitions (e.g. `typedef <type> <identifier>` in C)
-@type.qualifier ; type qualifiers (e.g. `const`)
@attribute ; attribute annotations (e.g. Python decorators)
@attribute.builtin ; builtin annotations (e.g. `@property` in Python)
diff --git a/queries/blueprint/highlights.scm b/queries/blueprint/highlights.scm
index faefd319d..f3c39f232 100644
--- a/queries/blueprint/highlights.scm
+++ b/queries/blueprint/highlights.scm
@@ -49,9 +49,6 @@
(menu_item
"item" @function.macro)
-(template_definition
- (template_name_qualifier) @type.qualifier)
-
(import_statement
(gobject_library) @module)
diff --git a/queries/chatito/highlights.scm b/queries/chatito/highlights.scm
index 492718320..47113f2cf 100644
--- a/queries/chatito/highlights.scm
+++ b/queries/chatito/highlights.scm
@@ -30,7 +30,7 @@
(slot) @type
-(variation) @type.qualifier
+(variation) @attribute
(alias) @keyword.directive
diff --git a/queries/eds/highlights.scm b/queries/eds/highlights.scm
index 5fef3ab46..0e008c979 100644
--- a/queries/eds/highlights.scm
+++ b/queries/eds/highlights.scm
@@ -27,21 +27,7 @@
(section_name) @_name
(statement
(key) @_key) @type
- (#match? @_key "\\c^ObjectType$")
- (#not-match? @_name "\\c^Comments$"))
-
-(section
- (section_name) @_name
- (statement
- (key) @_key) @type
- (#match? @_key "\\c^DataType$")
- (#not-match? @_name "\\c^Comments$"))
-
-(section
- (section_name) @_name
- (statement
- (key) @_key) @type.qualifier
- (#match? @_key "\\c^AccessType$")
+ (#match? @_key "\\c^(ObjectType|DataType|AccessType)$")
(#not-match? @_name "\\c^Comments$"))
(section