-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd9ed77
commit 44eecf1
Showing
15 changed files
with
346 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ | |
[submodule "submodules/chime-python"] | ||
path = submodules/chime-python | ||
url = [email protected]:ChimeHQ/chime-python.git | ||
[submodule "submodules/chime-ruby"] | ||
path = submodules/chime-ruby | ||
url = [email protected]:ChimeHQ/chime-ruby.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 154 additions & 0 deletions
154
Edit/Resources/LanguageData/Ruby/queries/highlights.scm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
(identifier) @variable | ||
|
||
((identifier) @function.method | ||
(#is-not? local)) | ||
|
||
[ | ||
"alias" | ||
"and" | ||
"begin" | ||
"break" | ||
"case" | ||
"class" | ||
"def" | ||
"do" | ||
"else" | ||
"elsif" | ||
"end" | ||
"ensure" | ||
"for" | ||
"if" | ||
"in" | ||
"module" | ||
"next" | ||
"or" | ||
"rescue" | ||
"retry" | ||
"return" | ||
"then" | ||
"unless" | ||
"until" | ||
"when" | ||
"while" | ||
"yield" | ||
] @keyword | ||
|
||
((identifier) @keyword | ||
(#match? @keyword "^(private|protected|public)$")) | ||
|
||
(constant) @constructor | ||
|
||
; Function calls | ||
|
||
"defined?" @function.method.builtin | ||
|
||
(call | ||
method: [(identifier) (constant)] @function.method) | ||
|
||
((identifier) @function.method.builtin | ||
(#eq? @function.method.builtin "require")) | ||
|
||
; Function definitions | ||
|
||
(alias (identifier) @function.method) | ||
(setter (identifier) @function.method) | ||
(method name: [(identifier) (constant)] @function.method) | ||
(singleton_method name: [(identifier) (constant)] @function.method) | ||
|
||
; Identifiers | ||
|
||
[ | ||
(class_variable) | ||
(instance_variable) | ||
] @property | ||
|
||
((identifier) @constant.builtin | ||
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$")) | ||
|
||
(file) @constant.builtin | ||
(line) @constant.builtin | ||
(encoding) @constant.builtin | ||
|
||
(hash_splat_nil | ||
"**" @operator) @constant.builtin | ||
|
||
((constant) @constant | ||
(#match? @constant "^[A-Z\\d_]+$")) | ||
|
||
[ | ||
(self) | ||
(super) | ||
] @variable.builtin | ||
|
||
(block_parameter (identifier) @variable.parameter) | ||
(block_parameters (identifier) @variable.parameter) | ||
(destructured_parameter (identifier) @variable.parameter) | ||
(hash_splat_parameter (identifier) @variable.parameter) | ||
(lambda_parameters (identifier) @variable.parameter) | ||
(method_parameters (identifier) @variable.parameter) | ||
(splat_parameter (identifier) @variable.parameter) | ||
|
||
(keyword_parameter name: (identifier) @variable.parameter) | ||
(optional_parameter name: (identifier) @variable.parameter) | ||
|
||
; Literals | ||
|
||
[ | ||
(string) | ||
(bare_string) | ||
(subshell) | ||
(heredoc_body) | ||
(heredoc_beginning) | ||
] @string | ||
|
||
[ | ||
(simple_symbol) | ||
(delimited_symbol) | ||
(hash_key_symbol) | ||
(bare_symbol) | ||
] @string.special.symbol | ||
|
||
(regex) @string.special.regex | ||
(escape_sequence) @escape | ||
|
||
[ | ||
(integer) | ||
(float) | ||
] @number | ||
|
||
[ | ||
(nil) | ||
(true) | ||
(false) | ||
] @constant.builtin | ||
|
||
(interpolation | ||
"#{" @punctuation.special | ||
"}" @punctuation.special) @embedded | ||
|
||
(comment) @comment | ||
|
||
; Operators | ||
|
||
[ | ||
"=" | ||
"=>" | ||
"->" | ||
] @operator | ||
|
||
[ | ||
"," | ||
";" | ||
"." | ||
] @punctuation.delimiter | ||
|
||
[ | ||
"(" | ||
")" | ||
"[" | ||
"]" | ||
"{" | ||
"}" | ||
"%w(" | ||
"%i(" | ||
] @punctuation.bracket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
((method) @local.scope | ||
(#set! local.scope-inherits false)) | ||
|
||
[ | ||
(lambda) | ||
(block) | ||
(do_block) | ||
] @local.scope | ||
|
||
(block_parameter (identifier) @local.definition) | ||
(block_parameters (identifier) @local.definition) | ||
(destructured_parameter (identifier) @local.definition) | ||
(hash_splat_parameter (identifier) @local.definition) | ||
(lambda_parameters (identifier) @local.definition) | ||
(method_parameters (identifier) @local.definition) | ||
(splat_parameter (identifier) @local.definition) | ||
|
||
(keyword_parameter name: (identifier) @local.definition) | ||
(optional_parameter name: (identifier) @local.definition) | ||
|
||
(identifier) @local.reference | ||
|
||
(assignment left: (identifier) @local.definition) | ||
(operator_assignment left: (identifier) @local.definition) | ||
(left_assignment_list (identifier) @local.definition) | ||
(rest_assignment (identifier) @local.definition) | ||
(destructured_left_assignment (identifier) @local.definition) |
Oops, something went wrong.