Off-by-one in hover position
mtoohey31 opened this issue · 1 comments
- Component: LSP (used with other editor)
- LSP version:
Version: 0.12.0, commit unknown (Typst version 0.10.0)
- OS version and name: NixOS 24.05 (Uakari)
- I am on the latest stable version of the extension/LSP. (I have also reproduced building from commit 0d5b933, the latest as of writing.)
- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
When hovering, the position used to produce information appears to be off by one, to the right. This means that if you hover on the first character of an identifier, you won't get any info. I discovered this while using the language server with Helix.
Potential Cause
I believe we're actually doing everything correctly, and that the root issue is in the typst-syntax
crate. I'm going to open an issue upstream to ask for clarification on how things are supposed to work, and suggest a potential fix. Just wanted to document things here so someone else investigates if I end up forgetting about this.
Now that typst/typst#3767 has been merged, next time we update the typst-ide
this should be resolved. When calling functions that now take a Side
parameter, we should always use Side::After
.