mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
Ruby constants highlighted as Type
In ruby constants and types are usually highlighted the sameway. Based on vim-ruby highlight. https://github.com/vim-ruby/vim-ruby/blob/master/syntax/ruby.vim#L502
This commit is contained in:
parent
be9c4ab36d
commit
f6b4c6b2d6
1 changed files with 5 additions and 5 deletions
|
|
@ -45,7 +45,7 @@
|
||||||
"while"
|
"while"
|
||||||
] @repeat
|
] @repeat
|
||||||
|
|
||||||
(constant) @constant
|
(constant) @type
|
||||||
|
|
||||||
((identifier) @keyword
|
((identifier) @keyword
|
||||||
(#vim-match? @keyword "^(private|protected|public)$"))
|
(#vim-match? @keyword "^(private|protected|public)$"))
|
||||||
|
|
@ -82,12 +82,12 @@
|
||||||
|
|
||||||
(method name: [
|
(method name: [
|
||||||
(identifier) @function
|
(identifier) @function
|
||||||
(constant) @constant
|
(constant) @type
|
||||||
])
|
])
|
||||||
|
|
||||||
(singleton_method name: [
|
(singleton_method name: [
|
||||||
(identifier) @function
|
(identifier) @function
|
||||||
(constant) @constant
|
(constant) @type
|
||||||
])
|
])
|
||||||
|
|
||||||
(class name: (constant) @type)
|
(class name: (constant) @type)
|
||||||
|
|
@ -103,8 +103,8 @@
|
||||||
((identifier) @constant.builtin
|
((identifier) @constant.builtin
|
||||||
(#vim-match? @constant.builtin "^__(callee|dir|id|method|send|ENCODING|FILE|LINE)__$"))
|
(#vim-match? @constant.builtin "^__(callee|dir|id|method|send|ENCODING|FILE|LINE)__$"))
|
||||||
|
|
||||||
((constant) @constant.macro
|
((constant) @type
|
||||||
(#vim-match? @constant.macro "^[A-Z\\d_]+$"))
|
(#vim-match? @type "^[A-Z\\d_]+$"))
|
||||||
|
|
||||||
[
|
[
|
||||||
(self)
|
(self)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue