]> git.eshelyaron.com Git - emacs.git/commitdiff
Abide by lsp when reporting and moving to columns
authorJoão Távora <joaotavora@gmail.com>
Fri, 29 Nov 2019 23:42:58 +0000 (23:42 +0000)
committerFelicián Németh <felician.nemeth@gmail.com>
Wed, 8 Jan 2020 16:00:49 +0000 (17:00 +0100)
* eglot.el (eglot-current-column-function): Set to
eglot-lsp-abiding-column.
(eglot-move-to-column-function): Set to
eglot-move-to-lsp-abiding-column.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/361

lisp/progmodes/eglot.el

index 888eacc690a8a33fe71c8d41417e1b5d5713101b..cbfb926036af43e466490297c50a2b6a913546bf 100644 (file)
@@ -999,7 +999,7 @@ CONNECT-ARGS are passed as additional arguments to
 
 (defun eglot-current-column () (- (point) (point-at-bol)))
 
-(defvar eglot-current-column-function #'eglot-current-column
+(defvar eglot-current-column-function #'eglot-lsp-abiding-column
   "Function to calculate the current column.
 
 This is the inverse operation of
@@ -1023,7 +1023,7 @@ for all others.")
          :character (progn (when pos (goto-char pos))
                            (funcall eglot-current-column-function)))))
 
-(defvar eglot-move-to-column-function #'eglot-move-to-column
+(defvar eglot-move-to-column-function #'eglot-move-to-lsp-abiding-column
   "Function to move to a column reported by the LSP server.
 
 According to the standard, LSP column/character offsets are based