Skip to content

Commit

Permalink
* eglot.el (eglot-xref-backend): Don't check capability here.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaotavora committed Oct 9, 2019
1 parent 975a29c commit de7f2bc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -1705,9 +1705,7 @@ Calls REPORT-FN maybe if server publishes diagnostics in time."
(funcall report-fn (cdr eglot--unreported-diagnostics))
(setq eglot--unreported-diagnostics nil)))

(defun eglot-xref-backend ()
"EGLOT xref backend."
(when (eglot--server-capable :definitionProvider) 'eglot))
(defun eglot-xref-backend () "EGLOT xref backend." 'eglot)

(defvar eglot--temp-location-buffers (make-hash-table :test #'equal)
"Helper variable for `eglot--handling-xrefs'.")
Expand Down Expand Up @@ -1783,9 +1781,12 @@ Try to visit the target file for a richer summary line."
(eglot--TextDocumentPositionParams)
extra-params)))))

(defun eglot--lsp-xref-helper (method)
(cl-defun eglot--lsp-xref-helper (method &key extra-params capability )
"Helper for `eglot-find-declaration' & friends."
(let ((eglot--lsp-xref-refs (eglot--lsp-xrefs-for-method method)))
(let ((eglot--lsp-xref-refs (eglot--lsp-xrefs-for-method
method
:extra-params extra-params
:capability capability)))
(xref-find-references "LSP identifier at point.")))

(defun eglot-find-declaration ()
Expand Down

0 comments on commit de7f2bc

Please sign in to comment.