Skip to content

Commit

Permalink
Add textobjects and indents to cmake (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flakebi committed Dec 25, 2021
1 parent 5d7b5db commit ec878e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| bash || | | `bash-language-server` |
| c || | | `clangd` |
| c-sharp || | | |
| cmake || | | `cmake-language-server` |
| cmake || | | `cmake-language-server` |
| comment || | | |
| cpp || | | `clangd` |
| css || | | |
Expand Down
12 changes: 12 additions & 0 deletions runtime/queries/cmake/indents.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
indent = [
"if_condition",
"foreach_loop",
"while_loop",
"function_def",
"macro_def",
"normal_command",
]

outdent = [
")"
]
3 changes: 3 additions & 0 deletions runtime/queries/cmake/textobjects.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(macro_def) @function.around

(argument) @parameter.inside

0 comments on commit ec878e4

Please sign in to comment.