Closed supersurviveur closed 4 weeks ago
Typst LSP seems to use "when": "editorLangId == typst"
in the package.json
file instead of "when": "resourceLangId == typst && editorTextFocus"
https://github.com/nvarner/typst-lsp/blob/master/editors/vscode/package.json#L314-L319
But it is a bit meaningless if you are try to preview an extension console, since typst-preview will start a preview on the focused editor. Please correct me if there are reasonable use cases.
Typst LSP seems to start rendering in the right place, even after clicking on the terminal. VSCode should be able to know that the document is loaded, even if the focus is in the terminal or the file tree, and i think it's possible to launch the preview on the document. This can be useful especially when opening a file, as the document doesn't take the focus.
maybe we can try disable editorTextFocus
and see if it works when editor is not focused. Like focusing on debug/output panel or terminal
It doesn't work for the output panel 🤔. But seems to work in terminal. perhaps we can add a check for that.
It also doesn't work in the output panel for Typst LSP.
Describe the bug
When I click outside the typst document (but keeping it open), the preview icon in the top right-hand corner disappears.
https://github.com/Enter-tainer/typst-preview/assets/54775010/a8a30463-3d27-4fc6-b3a7-c253a08b2947
To Reproduce
Expected behavior The preview icon should remain visible as long as the document is open, even if the user clicks outside the document.
Package/Software version:
typst-preview extension version:
v0.10.8