diff options
| author | Kassio Borges <kassioborgesm@gmail.com> | 2020-12-18 13:51:18 +0000 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-02-22 21:08:49 +0100 |
| commit | f6b4c6b2d6075a0b14bd09fb003a37f19a47e025 (patch) | |
| tree | 624afc78b3ad75043948ab967b694f57c44e0e91 /queries/ruby | |
| parent | Fix indent size (diff) | |
| download | nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.tar nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.tar.gz nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.tar.bz2 nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.tar.lz nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.tar.xz nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.tar.zst nvim-treesitter-f6b4c6b2d6075a0b14bd09fb003a37f19a47e025.zip | |
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
Diffstat (limited to 'queries/ruby')
| -rw-r--r-- | queries/ruby/highlights.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm index 6dd99a25c..e77687920 100644 --- a/queries/ruby/highlights.scm +++ b/queries/ruby/highlights.scm @@ -45,7 +45,7 @@ "while" ] @repeat -(constant) @constant +(constant) @type ((identifier) @keyword (#vim-match? @keyword "^(private|protected|public)$")) @@ -82,12 +82,12 @@ (method name: [ (identifier) @function - (constant) @constant + (constant) @type ]) (singleton_method name: [ (identifier) @function - (constant) @constant + (constant) @type ]) (class name: (constant) @type) @@ -103,8 +103,8 @@ ((identifier) @constant.builtin (#vim-match? @constant.builtin "^__(callee|dir|id|method|send|ENCODING|FILE|LINE)__$")) -((constant) @constant.macro - (#vim-match? @constant.macro "^[A-Z\\d_]+$")) +((constant) @type + (#vim-match? @type "^[A-Z\\d_]+$")) [ (self) |
