diff options
author | Sebastian Neubauer | 2021-12-25 15:10:19 +0000 |
---|---|---|
committer | GitHub | 2021-12-25 15:10:19 +0000 |
commit | ec878e40114d8992c3ed1221f77271a4508d3cde (patch) | |
tree | 6dd361ff3d23026de8f7d67f28144a2d28ed4ad9 | |
parent | 5d7b5db8ab284e0c2a41e6fbda08857f87406780 (diff) |
Add textobjects and indents to cmake (#1307)
-rw-r--r-- | book/src/generated/lang-support.md | 2 | ||||
-rw-r--r-- | runtime/queries/cmake/indents.toml | 12 | ||||
-rw-r--r-- | runtime/queries/cmake/textobjects.scm | 3 |
3 files changed, 16 insertions, 1 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index c7054201..2777dc4e 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -3,7 +3,7 @@ | bash | ✓ | | | `bash-language-server` | | c | ✓ | | | `clangd` | | c-sharp | ✓ | | | | -| cmake | ✓ | | | `cmake-language-server` | +| cmake | ✓ | ✓ | ✓ | `cmake-language-server` | | comment | ✓ | | | | | cpp | ✓ | | | `clangd` | | css | ✓ | | | | diff --git a/runtime/queries/cmake/indents.toml b/runtime/queries/cmake/indents.toml new file mode 100644 index 00000000..8b886a4f --- /dev/null +++ b/runtime/queries/cmake/indents.toml @@ -0,0 +1,12 @@ +indent = [ + "if_condition", + "foreach_loop", + "while_loop", + "function_def", + "macro_def", + "normal_command", +] + +outdent = [ + ")" +] diff --git a/runtime/queries/cmake/textobjects.scm b/runtime/queries/cmake/textobjects.scm new file mode 100644 index 00000000..b0d1b108 --- /dev/null +++ b/runtime/queries/cmake/textobjects.scm @@ -0,0 +1,3 @@ +(macro_def) @function.around + +(argument) @parameter.inside |