Variable: eglot-move-to-linepos-function
eglot-move-to-linepos-function is a variable defined in eglot.el.gz.
Value
eglot-move-to-utf-16-linepos
Documentation
Function to move to a position within a line reported by the LSP server.
Per the LSP spec, character offsets in LSP Position objects count
UTF-16 code units, not actual code points. So when LSP says
position 3 of a line containing just "aXbc", where X is a funny
looking character in the UTF-16 "supplementary plane", it
actually means b, not c. The default value
eglot-move-to-utf-16-linepos accounts for this.
This variable can also be set to eglot-move-to-utf-8-linepos or
eglot-move-to-utf-32-linepos for servers not closely following
the spec. Also, since LSP 3.17 server and client may agree on an
encoding and Eglot will set this variable automatically.
Aliases
eglot-move-to-column-function (obsolete since 29.1)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defvar eglot-move-to-linepos-function #'eglot-move-to-utf-16-linepos
"Function to move to a position within a line reported by the LSP server.
Per the LSP spec, character offsets in LSP Position objects count
UTF-16 code units, not actual code points. So when LSP says
position 3 of a line containing just \"aXbc\", where X is a funny
looking character in the UTF-16 \"supplementary plane\", it
actually means `b', not `c'. The default value
`eglot-move-to-utf-16-linepos' accounts for this.
This variable can also be set to `eglot-move-to-utf-8-linepos' or
`eglot-move-to-utf-32-linepos' for servers not closely following
the spec. Also, since LSP 3.17 server and client may agree on an
encoding and Eglot will set this variable automatically.")