typst-lsp
typst-lsp copied to clipboard
typst LSP panics on emacs
-
Component:
- [ ] VSCode Extension
- [ ] VSCodium Extension
- [x] LSP (used with other editor)
- Extension version: N/A
-
LSP version: git (rev
7a9e8e0d5bf8ac24a6af44ec8a19d511c2373ea2
), also tested on stable from nixpkgs - OS version and name: NixOS Unstable
- [x] I am on the latest stable version of the extension/LSP.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
Issue
I'm trying to get typst-lsp working with emacs (specifically DOOM emacs), however whenever I try to perform any lsp related actions (such as pressing enter to select a code completion) the server panics.
Doom emacs config code (using lsp-mode
and typst-mode.el
. typst-mode.el
does not use any form of LSP):
(after! lsp-mode
(add-to-list 'lsp-language-id-configuration
'("\\.typ$" . "typst"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "typst-lsp")
:activation-fn (lsp-activate-on "typst")
:server-id 'typst-lsp)))
(use-package! typst-mode)
(add-hook 'typst-mode-local-vars-hook #'lsp!)
(add-hook 'typst--markup-mode-local-vars-hook #'lsp!)
(add-hook 'typst--code-mode-local-vars-hook #'lsp!)
Logs
thread 'main' panicked at 'slice index starts at 245 but ends at 212', /build/rustc-1.69.0-src/library/alloc/src/vec/mod.rs:2004:36
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Process typst-lsp stderr finished