Open joshi-monster opened 2 months ago
Thank you. I expect this'll be due to LSP using utf-16 and we're using utf-8.
Hello. I looked a bit into this.
Supposedly by setting the position_encoding type to UTF-8 the problem should be solved.
After specifying the encoding it works correctly with editors that support UTF-8 encoding, like neovim.
But it doesn't work with vscode.
This is the error I get:
Error: Unsupported position encoding (utf-8) received from server Gleam Language Server
Not sure about zed, I can't figure out how to change the path of the gleam language server to use my local binary.
Hovering is also affected by this problem, probably everything that interacts with positions. I will try to look more into what can be done this week. But from a quick skimming through, a lot of things need to be changed :smile:
Thank you @aaron-loa !!
The string is
"क्षि"
, or"\u{0915}\u{094D}\u{0937}\u{093F}"
.From the looks of it it actually just uses the byte/code unit count.
Tested with Gleam v1.4.1, in VSCode, Zed and Helix :purple_heart: