mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
fix(highlights): Add TSNamespace highlight
Start adding highlights for
- C++
- Rust (including other scoped_identifier/scoped_type_identifier fixes)
- JS (only namespace_import)
Addresses #516
This commit is contained in:
parent
f5ac2b4a1a
commit
45397ebbd9
8 changed files with 46 additions and 12 deletions
|
|
@ -28,14 +28,16 @@
|
|||
name: (scoped_identifier
|
||||
name: (identifier) @function))
|
||||
|
||||
(namespace_identifier) @constant
|
||||
|
||||
((identifier) @type (#match? @type "^[A-Z]"))
|
||||
|
||||
(namespace_identifier) @namespace
|
||||
((namespace_identifier) @type
|
||||
(#match? @type "^[A-Z]"))
|
||||
((namespace_identifier) @constant
|
||||
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
(namespace_definition
|
||||
name: (identifier) @namespace)
|
||||
|
||||
(destructor_name
|
||||
name: (_) @function)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue