Filter out 'eglot backend from doom-thing-at-point
Context : https://github.com/joaotavora/eglot/issues/503 Fixes a bug where having eglot enabled in a buffer will make `SPC *` search the whole project for literally `LSP Identifier at point.`
This commit is contained in:
parent
1878a08814
commit
32f9070614
1 changed files with 3 additions and 1 deletions
|
@ -105,9 +105,11 @@ in some cases."
|
||||||
(doom-region-end)))
|
(doom-region-end)))
|
||||||
(thing
|
(thing
|
||||||
(thing-at-point thing t))
|
(thing-at-point thing t))
|
||||||
((require 'xref nil t)
|
((and (require 'xref nil t) (not (eq (xref-find-backend) 'eglot)))
|
||||||
;; A little smarter than using `symbol-at-point', though in most cases,
|
;; A little smarter than using `symbol-at-point', though in most cases,
|
||||||
;; xref ends up using `symbol-at-point' anyway.
|
;; xref ends up using `symbol-at-point' anyway.
|
||||||
|
;; "Most cases" doesn't cover 'eglot so we manually exclude it.
|
||||||
|
;; See discussion in https://github.com/joaotavora/eglot/issues/503
|
||||||
(xref-backend-identifier-at-point (xref-find-backend)))
|
(xref-backend-identifier-at-point (xref-find-backend)))
|
||||||
(prompt
|
(prompt
|
||||||
(read-string (if (stringp prompt) prompt "")))))
|
(read-string (if (stringp prompt) prompt "")))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue