-
-
Notifications
You must be signed in to change notification settings - Fork 435
Unicode symbols >= π are brokenΒ #2646
Copy link
Copy link
Open
Labels
component: ghcidecomponent: lsptype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Metadata
Metadata
Assignees
Labels
component: ghcidecomponent: lsptype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Your environment
Which OS do you use: MacOS
Which LSP client (editor/plugin) do you use: Sublime Code
Steps to reproduce
Expected behaviour
Both
aaaandπππshould be underlined as unused bindings.Actual behaviour
aaais underlined correctly, but only the first character ofπππis underlined.That's because HLS does not distinguish positions returned from GHC (which are in code points = characters) from positions mandated by LSP (which are UTF-16 code units). Basically, GHC says us that 3 first code points in line 5 are an unused binding. Each
πis a single character, but 2 UTF-16 code units, so HLS should ask LSP to underline first 6 code units. Instead of this HLS asks LSP to underline only 3, and since the 3rd one is in the middle of the 2nd character, only the 1st character gets underlined.CC @michaelpj @alanz, this is related to haskell/lsp#392 (comment).