mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-26 03:13:29 +04:00
Fixed for grammar not being able to fetch.
Implementation of indent and textobjects querry for c3.
This commit is contained in:
parent
b39b3e5dd2
commit
1873b02c63
@ -420,7 +420,7 @@ source = { git = "https://github.com/sogaiu/tree-sitter-janet-simple", rev = "51
|
||||
|
||||
[[grammar]]
|
||||
name = "c3"
|
||||
source = { git = "https://github.com/c3lang/tree-sitter-c3.git" , rev = "790a0326833cd647e00d8dec01268aa1ec2e3bdb" }
|
||||
source = { git = "https://github.com/c3lang/tree-sitter-c3" , rev = "790a0326833cd647e00d8dec01268aa1ec2e3bdb" }
|
||||
|
||||
[[language]]
|
||||
name = "c3"
|
||||
|
13
runtime/queries/c3/indents.scm
Normal file
13
runtime/queries/c3/indents.scm
Normal file
@ -0,0 +1,13 @@
|
||||
[
|
||||
(func_definition)
|
||||
(if_stmt)
|
||||
(enum_declaration)
|
||||
(for_stmt)
|
||||
(while_stmt)
|
||||
(case_stmt)
|
||||
(macro_declaration)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"}"
|
||||
] @outdent
|
17
runtime/queries/c3/textobjects.scm
Normal file
17
runtime/queries/c3/textobjects.scm
Normal file
@ -0,0 +1,17 @@
|
||||
(func_definition
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(struct_declaration
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(enum_declaration
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(fn_parameter_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(line_comment) @comment.inside
|
||||
(line_comment)+ @comment.around
|
||||
|
||||
(doc_comment) @comment.inside
|
||||
(doc_comment)+ @comment.outside
|
Loading…
Reference in New Issue
Block a user