mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -04:00
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.
This commit is contained in:
parent
94fa0d3189
commit
e28b65bb52
1 changed files with 38 additions and 5 deletions
|
|
@ -1,8 +1,5 @@
|
||||||
; Variables
|
; Variables
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
(interpolation
|
|
||||||
"#{" @punctuation.special
|
|
||||||
"}" @punctuation.special) @none
|
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
|
|
||||||
|
|
@ -31,6 +28,7 @@
|
||||||
"and"
|
"and"
|
||||||
"or"
|
"or"
|
||||||
"in"
|
"in"
|
||||||
|
"not"
|
||||||
] @keyword.operator
|
] @keyword.operator
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -166,13 +164,44 @@
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
[
|
[
|
||||||
|
"!"
|
||||||
"="
|
"="
|
||||||
|
"=="
|
||||||
|
"==="
|
||||||
|
"<=>"
|
||||||
"=>"
|
"=>"
|
||||||
"->"
|
"->"
|
||||||
"+"
|
">>"
|
||||||
"-"
|
"<<"
|
||||||
|
">"
|
||||||
|
"<"
|
||||||
|
">="
|
||||||
|
"<="
|
||||||
|
"**"
|
||||||
"*"
|
"*"
|
||||||
"/"
|
"/"
|
||||||
|
"%"
|
||||||
|
"+"
|
||||||
|
"-"
|
||||||
|
"&"
|
||||||
|
"|"
|
||||||
|
"^"
|
||||||
|
"&&"
|
||||||
|
"||"
|
||||||
|
"||="
|
||||||
|
"&&="
|
||||||
|
"!="
|
||||||
|
"%="
|
||||||
|
"+="
|
||||||
|
"-="
|
||||||
|
"*="
|
||||||
|
"/="
|
||||||
|
"=~"
|
||||||
|
"!~"
|
||||||
|
"?"
|
||||||
|
":"
|
||||||
|
".."
|
||||||
|
"..."
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -192,4 +221,8 @@
|
||||||
"%i("
|
"%i("
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
(interpolation
|
||||||
|
"#{" @punctuation.special
|
||||||
|
"}" @punctuation.special) @none
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue