diff options
| author | Cameron <Alleyria@gmail.com> | 2021-11-08 14:07:10 +0100 |
|---|---|---|
| committer | Santos Gallegos <stsewd@protonmail.com> | 2021-11-11 21:04:42 -0500 |
| commit | e28b65bb52b253d84d8674facb30c10bf3a84119 (patch) | |
| tree | 2b098be82512117c3e562a9a318833408571ad37 /queries/ruby | |
| parent | fix(vue.indents): add support for template_element (diff) | |
| download | nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.tar nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.tar.gz nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.tar.bz2 nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.tar.lz nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.tar.xz nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.tar.zst nvim-treesitter-e28b65bb52b253d84d8674facb30c10bf3a84119.zip | |
Add Operators for Ruby
Many operators were missing from ruby, so, I added them.
Additionally, with string interpolation (`"#{xxx}"`), the closing `}` was being matched to `punctuation.bracket` instead of `punctuation.special`, so I fixed that too.
I didn't see any further details about how to contribute, so if I've overlooked anything, I'll be happy to add it.
Diffstat (limited to 'queries/ruby')
| -rw-r--r-- | queries/ruby/highlights.scm | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm index af21c64ce..1485752bd 100644 --- a/queries/ruby/highlights.scm +++ b/queries/ruby/highlights.scm @@ -1,8 +1,5 @@ ; Variables (identifier) @variable -(interpolation - "#{" @punctuation.special - "}" @punctuation.special) @none ; Keywords @@ -31,6 +28,7 @@ "and" "or" "in" + "not" ] @keyword.operator [ @@ -166,13 +164,44 @@ ; Operators [ + "!" "=" + "==" + "===" + "<=>" "=>" "->" - "+" - "-" + ">>" + "<<" + ">" + "<" + ">=" + "<=" + "**" "*" "/" + "%" + "+" + "-" + "&" + "|" + "^" + "&&" + "||" + "||=" + "&&=" + "!=" + "%=" + "+=" + "-=" + "*=" + "/=" + "=~" + "!~" + "?" + ":" + ".." + "..." ] @operator [ @@ -192,4 +221,8 @@ "%i(" ] @punctuation.bracket +(interpolation + "#{" @punctuation.special + "}" @punctuation.special) @none + (ERROR) @error |
