Function: eglot--pos-to-lsp-position

eglot--pos-to-lsp-position is a byte-compiled function defined in eglot.el.gz.

Signature

(eglot--pos-to-lsp-position &optional POS)

Documentation

Convert point POS to LSP position.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot--pos-to-lsp-position (&optional pos)
  "Convert point POS to LSP position."
  (eglot--widening
   ;; LSP line is zero-origin; emacs is one-origin.
   (list :line (1- (line-number-at-pos pos t))
         :character (progn (when pos (goto-char pos))
                           (funcall eglot-current-linepos-function)))))