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
Add functions to convert between code-point and code-unit positions
LSP `Position`s use UTF-16 code units for offsets within lines; most
other sane tools (like GHC) use Unicode code points. We need to use the
right one in the right place, otherwise we get issues like
haskell/haskell-language-server#2646.
This is pretty unpleasant, since code points are variable-size, so you
can't do the conversion without having the file text itself.
This PR provides a type for positions using code points (for clients to
use to help them be less confused) and functions for using the VFS to
convert between those and LSP positions.
0 commit comments