Unnamed repository; edit this file 'description' to name the repository.
feat(queries/typst): add textobjects (#15456)
| -rw-r--r-- | book/src/generated/lang-support.md | 2 | ||||
| -rw-r--r-- | runtime/queries/typst/textobjects.scm | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index c116ffc5..7b0f21c1 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -302,7 +302,7 @@ | twig | ✓ | | | | | | | typescript | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` | | typespec | ✓ | ✓ | ✓ | | | `tsp-server` | -| typst | ✓ | | | ✓ | | `tinymist` | +| typst | ✓ | ✓ | | ✓ | | `tinymist` | | ungrammar | ✓ | | | | | | | unison | ✓ | ✓ | ✓ | ✓ | ✓ | | | uxntal | ✓ | | | | | | diff --git a/runtime/queries/typst/textobjects.scm b/runtime/queries/typst/textobjects.scm new file mode 100644 index 00000000..516c0afe --- /dev/null +++ b/runtime/queries/typst/textobjects.scm @@ -0,0 +1,23 @@ +(let + pattern: (call) + value: (_) @function.inside) @function.around + +(call + (group + ((_) @parameter.inside . ","? @parameter.around) @parameter.around)) + +(lambda + pattern: + (group + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + value: (_) @function.inside) @function.around + +(group + [ + (tagged (_) @entry.inside) + (_) + ] @entry.around) + +(comment) @comment.inside + +(comment)+ @comment.around |