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.
Add textobjects.scm for zig (helix-editor#4409)
- Loading branch information
1 parent
14c0b51
commit 297bbc8
Showing
2 changed files
with
24 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
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,23 @@ | ||
(TopLevelDecl (FnProto) | ||
(_) @function.inside) @function.around | ||
|
||
(TestDecl (_) @test.inside) @test.around | ||
|
||
; matches all of: struct, enum, union | ||
; this unfortunately cannot be split up because | ||
; of the way struct "container" types are defined | ||
(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ContainerDecl | ||
(_) @class.inside))))) @class.around | ||
|
||
(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ErrorSetDecl | ||
(_) @class.inside))))) @class.around | ||
|
||
(ParamDeclList | ||
((_) @parameter.inside . ","? @parameter.around) @parameter.around) | ||
|
||
[ | ||
(doc_comment) | ||
(line_comment) | ||
] @comment.inside | ||
(line_comment)+ @comment.around | ||
(doc_comment)+ @comment.around |