You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
Version: 0.13.0, commit 69cdef3bd74a908dc2677d8a7edbc7ce533edbaa (Typst version 0.11.0)
OS version and name: Gentoo Linux with kernel version 6.6.47
Issue
When opening a typ file I get this error:
Error executing vim.schedule lua callback: .../share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:308: .../share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:153: index out of range
stack traceback:
[builtin#36]: at 0x558343e5ae70
.../share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:308: in function 'handler'
.../share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
The issue is triggered in the function tokens_to_range, when converting the column index to a byte index regarding the encoding provided by the client. In some cases the converted index is out of range and results in an error. I am unsure if this is a bug in neovim or in how the semantic tokens mode of typst-lsp is handling this. I don't know which lsp has also semantic tokens mode that I could test with my environment, if someone has one in mind, I would test it.
I tried to disable the mode but that didn't work for unknown reasons:
The lsp logs only show a warning that shouldn't be related to this issue:
[START][2024-10-20 22:04:21] LSP logging initiated
[WARN][2024-10-20 22:04:21] ...lsp/handlers.lua:135 "The language server typst_lsp triggers a registerCapability handler for workspace/didChangeConfiguration despite dynamicRegistration set to false. Report upstream, this warning is harmless"
The text was updated successfully, but these errors were encountered:
Issue
When opening a
typ
file I get this error:The issue is triggered in the function
tokens_to_range
, when converting the column index to a byte index regarding the encoding provided by the client. In some cases the converted index is out of range and results in an error. I am unsure if this is a bug in neovim or in how the semantic tokens mode of typst-lsp is handling this. I don't know which lsp has also semantic tokens mode that I could test with my environment, if someone has one in mind, I would test it.I tried to disable the mode but that didn't work for unknown reasons:
Logs
The lsp logs only show a warning that shouldn't be related to this issue:
The text was updated successfully, but these errors were encountered: