mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-05 11:57:43 +03:00
Add textobjects and indents to c and cpp (#1293)
Indentation of single line statements doesn't work, i.e. for (;;)<hit enter> leads to for(;;) <cursor here> Only blocks with curly braces are indented.
This commit is contained in:
parent
641255ccc8
commit
5b1a628e81
5 changed files with 55 additions and 2 deletions
13
runtime/queries/c/textobjects.scm
Normal file
13
runtime/queries/c/textobjects.scm
Normal file
|
@ -0,0 +1,13 @@
|
|||
(function_definition
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(struct_specifier
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(enum_specifier
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(union_specifier
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(parameter_declaration) @parameter.inside
|
Loading…
Add table
Add a link
Reference in a new issue