From c3a8bcf95f91aefcefc3094ec93a12cf5fc4d5b6 Mon Sep 17 00:00:00 2001 From: cgahr <26804763+cgahr@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:49:24 +0100 Subject: [PATCH] typst: add symbols query (#12793) Co-authored-by: Constantin Gahr --- book/src/generated/lang-support.md | 2 +- runtime/queries/typst/symbols.scm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/typst/symbols.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index c4c0ade45..102f4dc4a 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -220,7 +220,7 @@ | twig | ✓ | | | | | | typescript | ✓ | ✓ | ✓ | | `typescript-language-server` | | typespec | ✓ | ✓ | ✓ | | `tsp-server` | -| typst | ✓ | | | | `tinymist`, `typst-lsp` | +| typst | ✓ | | | ✓ | `tinymist`, `typst-lsp` | | ungrammar | ✓ | | | | | | unison | ✓ | ✓ | ✓ | | | | uxntal | ✓ | | | | | diff --git a/runtime/queries/typst/symbols.scm b/runtime/queries/typst/symbols.scm new file mode 100644 index 000000000..c27cf11a0 --- /dev/null +++ b/runtime/queries/typst/symbols.scm @@ -0,0 +1,6 @@ +; should be a heading +(heading (text) @definition.class) + +; should be a label/reference/tag +(heading (label) @definition.function ) +(content (label) @definition.function)