Reputation: 11
While editing Typts files, KDE Kate editor switches the tinymist lsp context every time one switches to another file in another tab.
While compiling the main-typ
with the included files works (see minimal example), as soon as I edit the file to include, Kate via the language server reports [typst] label <labelnamehere> does not exist in the document
.
I found that Tinymist solved this by running the pin function (pinMain) on lsp attach, but how do I either change the Kate config to "run the pin function on lsp attach", or how can I interact with the lsp server automatically started by Kate to run this function myself?
main.typ
:
= Chapter from main
Text in `main` @adams95guide
#include "chapter1.typ"
#bibliography("bibliography.bib")
chapter1.typ
:
Text in included file. @munroe14whatif
// lsp error: "[typst] label <labelnamehere> does not exist in the document"
bibliography.bib
:
@book{munroe14whatif,
title = {What If? Serious Scientific Answers to Absurd Hypothetical Questions},
author = {Munroe, Randall},
year = 2014
}
@book{adams95guide,
author = {Adams, Douglas},
title = {The Hitchhiker's Guide to the Galaxy},
year = 1995
}
Screenshot to show references are correct:
{
"typst": {
"command": [
"tinymist"
],
"path": [
"~/.cargo/bin"
],
"root": ".",
"url": "https://github.com/Myriad-Dreamin/tinymist",
"highlightingModeRegex": "^Typst$"
}
}
Upvotes: 1
Views: 17