Open kanashimia opened 1 year ago
I was also trying to use the lsp in the helix editor, and while it recompiles just fine using the "onType" option, it doesn't if i choose the "onSave" option. Very weird
Yeah, It doesn't work manually with :lsp-workspace-command
or on save, it complains about missing file URI, and helix only exposes the doPdfExport
command and not the exportCurrentPdf
command thats in the VScode extension, aiui??
I'm trying to use the lsp as well in helix, with the configuration mentioned in the opening comment and a cargo install
ed version of typst-lsp. I'm not getting syntax highlighting though, is that something that should be there?
My languages.toml:
a .typ file:
If I'm not mistaken you also need the grammar to have syntax highlighting. I've just installed that one, but haven't really tried it: https://github.com/frozolotl/tree-sitter-typst
@alxsimon Thank you so much! That worked perfectly. I'll note that I did have to copy over the queries directory as opposed to just symlinking, but the results look pretty good to me.
How should I configure kak-lsp to work with typst lsp?
I tried this and typst-lsp doesn't seem to build pdf on save:
[language.typst]
filetypes = ["typ", "typst"]
roots = [".git"]
command = "typst-lsp"
args = []
[language.typst.settings.typst-lsp]
exportPdf = "onType"
But kak-lsp confirms that typst-lsp is up, it can read LSP server capabilities and whatnot.
Ivan
For example in helix you have to add this to the
languages.toml
:Should note specifically what can be passed as a
config
.I was able to find this only by looking through https://github.com/nvarner/typst-lsp/blob/5887fe041ef0bdfa15f4a15c76e636ea6265d90a/addons/vscode/package.json#L22-L39 You can just add a reference to that file.