[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 28ecd5d 34/69: Change the default of eglot-move-t
From: |
João Távora |
Subject: |
[elpa] externals/eglot 28ecd5d 34/69: Change the default of eglot-move-to-column-function |
Date: |
Sun, 20 Oct 2019 08:21:48 -0400 (EDT) |
branch: externals/eglot
commit 28ecd5df456fec6113751bd52816095e0be3e651
Author: Felicián Németh <address@hidden>
Commit: Felician Nemeth <Felicián Németh>
Change the default of eglot-move-to-column-function
Previous default (move-to-column) works on visual columns, the LSP
specification and the new default (eglot-move-to-column) use "real"
columns. Fixes #293 and #297.
* eglot.el (eglot-move-to-column): New function.
(eglot-move-to-column-function): Use it as default.
---
eglot.el | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index 23d53ed..b87d5bb 100644
--- a/eglot.el
+++ b/eglot.el
@@ -988,7 +988,7 @@ for all others.")
:character (progn (when pos (goto-char pos))
(funcall eglot-current-column-function)))))
-(defvar eglot-move-to-column-function #'move-to-column
+(defvar eglot-move-to-column-function #'eglot-move-to-column
"Function to move to a column reported by the LSP server.
According to the standard, LSP column/character offsets are based
@@ -999,7 +999,16 @@ where X is a multi-byte character, it actually means `b',
not
For buffers managed by fully LSP-compliant servers, this should
be set to `eglot-move-to-lsp-abiding-column', and
-`move-to-column' (the default) for all others.")
+`eglot-move-to-column' (the default) for all others.")
+
+(defun eglot-move-to-column (column)
+ "Move to COLUMN without closely following the LSP spec."
+ ;; We cannot use `move-to-column' here, because it moves to *visual*
+ ;; columns, which can be different from LSP columns in case of
+ ;; `whitespace-mode', `prettify-symbols-mode', etc. (github#296,
+ ;; github#297)
+ (goto-char (min (+ (line-beginning-position) column)
+ (line-end-position))))
(defun eglot-move-to-lsp-abiding-column (column)
"Move to COLUMN abiding by the LSP spec."
- [elpa] externals/eglot 14ab804 54/69: Fix #318: unbreak xref-find-definitions, (continued)
- [elpa] externals/eglot 14ab804 54/69: Fix #318: unbreak xref-find-definitions, João Távora, 2019/10/20
- [elpa] externals/eglot dbb5dd4 57/69: Slightly more robust completion tests, João Távora, 2019/10/20
- [elpa] externals/eglot 3604173 64/69: Unbreak eglot--setq-saving if symbol is unbound, João Távora, 2019/10/20
- [elpa] externals/eglot a11a41b 63/69: Use of company-capf backend in eglot-managed buffers, João Távora, 2019/10/20
- [elpa] externals/eglot 6e93622 27/69: Fix #273: leniently handle invalid positions sent by some servers, João Távora, 2019/10/20
- [elpa] externals/eglot 254fee0 46/69: Use more pyls and less rls in tests, João Távora, 2019/10/20
- [elpa] externals/eglot 0e5e08d 51/69: Support goto-{declaration, implementation, typeDefinition}, João Távora, 2019/10/20
- [elpa] externals/eglot 5a21670 59/69: Fix bug in workspace/didChangeWatchedfiles, João Távora, 2019/10/20
- [elpa] externals/eglot 9359c15 58/69: Close #316: add support for the Ada Language Server, João Távora, 2019/10/20
- [elpa] externals/eglot d6508e0 29/69: Fix #273: fix a typo, João Távora, 2019/10/20
- [elpa] externals/eglot 28ecd5d 34/69: Change the default of eglot-move-to-column-function,
João Távora <=
- [elpa] externals/eglot 7a70c97 33/69: Require array package to use current-line (#294), João Távora, 2019/10/20
- [elpa] externals/eglot f7a1bf6 49/69: Fix #236: much less noisy mode line, João Távora, 2019/10/20
- [elpa] externals/eglot 4c5d0d4 53/69: Misc improvements to the xref glue code, João Távora, 2019/10/20
- [elpa] externals/eglot 5ea4049 68/69: Fix #324: let user keep control of some variables during Eglot sessions, João Távora, 2019/10/20
- [elpa] externals/eglot 33a4f86 69/69: * eglot.el (Version): Bump to 1.5, João Távora, 2019/10/20
- [elpa] externals/eglot cf161b0 41/69: Test with emacs master on Travis, João Távora, 2019/10/20
- [elpa] externals/eglot 9e70cd2 40/69: * eglot-tests.el (python-autopep-formatting): Attempt to fix test., João Távora, 2019/10/20
- [elpa] externals/eglot c3bae0a 44/69: New test for the eglot-autoshutdown defcustom, João Távora, 2019/10/20
- [elpa] externals/eglot 28d8ffe 48/69: Fix #285: unbreak Elm language server which does use :triggerCharacters, João Távora, 2019/10/20
- [elpa] externals/eglot 06ff65d 52/69: Rework and correct major part of xref glue code, João Távora, 2019/10/20