forked from helix-editor/helix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(solidity): add textobject queries for solidity (helix-editor#10318)
* feat: add textobject queries for solidity * feat(solidity): add parameter textobject query for call expressions * feat(solidity): add more textobject queries for parameters * feat(solidity): add yul function textobject query * feat(solidity): add textobject query for emit statement arguments * feat(solidity): add textobject query for revert call arguments * feat(solidity): update tree-sitter grammar and fix typo * docs: update auto-generated docs * fix(solidity): fix identifiers highlight query priority * feat(solidity): add "abstract" to keywords list * feat(solidity): add highlight query for type alias * feat(solidity): add variable builtin highlight queries
- Loading branch information
Showing
4 changed files
with
67 additions
and
9 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
(function_definition | ||
body: (_) @function.inside) @function.around | ||
|
||
(constructor_definition | ||
body: (_) @function.inside) @function.around | ||
|
||
(fallback_receive_definition | ||
body: (_) @function.inside) @function.around | ||
|
||
(yul_function_definition | ||
(yul_block) @function.inside) @function.around | ||
|
||
(function_definition | ||
((parameter) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(constructor_definition | ||
((parameter) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(return_type_definition | ||
((parameter) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(modifier_definition | ||
((parameter) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(event_definition | ||
((event_parameter) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(error_declaration | ||
((error_parameter) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(call_argument | ||
((call_struct_argument) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(call_expression | ||
((call_argument) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(variable_declaration_tuple | ||
((variable_declaration) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(emit_statement | ||
((call_argument) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(revert_arguments | ||
((call_argument) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
(struct_declaration | ||
body: (_) @class.inside) @class.around | ||
|
||
(enum_declaration | ||
body: (_) @class.inside) @class.around | ||
|
||
(comment) @comment.inside | ||
|
||
(comment)+ @comment.around |