[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot cddab30 06/26: * eglot.el (eglot--current-column)
From: |
Jo�o T�vora |
Subject: |
[elpa] externals/eglot cddab30 06/26: * eglot.el (eglot--current-column): New helper. |
Date: |
Sun, 9 Dec 2018 19:11:25 -0500 (EST) |
branch: externals/eglot
commit cddab30728e91a9c3b201087467662a567e95f6f
Author: Michał Krzywkowski <address@hidden>
Commit: Michał Krzywkowski <address@hidden>
* eglot.el (eglot--current-column): New helper.
(eglot-current-column-function): Set to eglot--current-column.
(eglot--pos-to-lsp-position): Don't bind tab-width anymore.
(eglot--xref-make): Use eglot--current-column.
---
eglot.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/eglot.el b/eglot.el
index 1522935..94de8d1 100644
--- a/eglot.el
+++ b/eglot.el
@@ -811,7 +811,9 @@ CONNECT-ARGS are passed as additional arguments to
(let ((warning-minimum-level :error))
(display-warning 'eglot (apply #'format format args) :warning)))
-(defvar eglot-current-column-function #'current-column
+(defun eglot--current-column () (- (point) (point-at-bol)))
+
+(defvar eglot-current-column-function #'eglot--current-column
"Function to calculate the current column.
This is the inverse operation of
@@ -833,8 +835,7 @@ for all others.")
(eglot--widening
(list :line (1- (line-number-at-pos pos t)) ; F!@&#$CKING OFF-BY-ONE
:character (progn (when pos (goto-char pos))
- (let ((tab-width 1))
- (funcall eglot-current-column-function))))))
+ (funcall eglot-current-column-function)))))
(defvar eglot-move-to-column-function #'move-to-column
"Function to move to a column reported by the LSP server.
@@ -1502,11 +1503,10 @@ Try to visit the target file for a richer summary line."
(eglot--widening
(pcase-let* ((`(,beg . ,end) (eglot--range-region range))
(bol (progn (goto-char beg) (point-at-bol)))
- (substring (buffer-substring bol
(point-at-eol)))
- (tab-width 1))
+ (substring (buffer-substring bol
(point-at-eol))))
(add-face-text-property (- beg bol) (- end bol) 'highlight
t substring)
- (list substring (1+ (current-line)) (current-column))))))
+ (list substring (1+ (current-line))
(eglot--current-column))))))
(`(,summary ,line ,column)
(cond
(visiting (with-current-buffer visiting (funcall collect)))
- [elpa] externals/eglot updated (f291816 -> 23accee), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 11eb256 02/26: Fix #164: CodeAction command can be a Command object (#165), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 10b238b 03/26: Revert "Fix #164: CodeAction command can be a Command object (#165)", Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot cddab30 06/26: * eglot.el (eglot--current-column): New helper.,
Jo�o T�vora <=
- [elpa] externals/eglot 53bfdb7 19/26: Per #173: adjust previous fix, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 9fb5f0c 05/26: Per #52, #127: Improve performance of xref summary line collection, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 5bbf884 11/26: Use eglot--dbind for destructuring, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 81d035f 04/26: Fix #52: Use entire line as xref summary when available, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 96169d8 18/26: Per #173: fix bug introduced by previous fix, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 4874c22 14/26: Use javascript-typescript-langserver for typescript-mode (#174), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 66a1704 22/26: Scratch/use elpa flymake (#178), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot f63bedb 20/26: Fix #144: Use eglot--dbind and eglot--lambda throughout, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 3922cf3 01/26: Per #144, #156: control strictness towards incoming LSP messages, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 8140be5 07/26: Touch up last commit, Jo�o T�vora, 2018/12/09