emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/cider f56418106f: Restore xref-based jump-to-definition in


From: ELPA Syncer
Subject: [nongnu] elpa/cider f56418106f: Restore xref-based jump-to-definition in Babashka (#3460)
Date: Mon, 11 Sep 2023 12:59:31 -0400 (EDT)

branch: elpa/cider
commit f56418106f32717c68874142be679a1ee20bbc84
Author: vemv <vemv@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Restore xref-based jump-to-definition in Babashka (#3460)
    
    Fixes #3456
---
 CHANGELOG.md          | 1 +
 cider-xref-backend.el | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c294d2b57..cf87aa1731 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@
 - [#3250](https://github.com/clojure-emacs/cider/issues/3250): don't lose the 
CIDER session over TRAMP files. 
 - [#3413](https://github.com/clojure-emacs/cider/issues/3413): Make 
jump-to-definition work in projects needing `cider-path-translations` (i.e. 
Dockerized projects). 
 - [#2436](https://github.com/clojure-emacs/cider/issues/2436): Prevent 
malformed `cider-repl-history-file`s from failing `cider-jack-in`.
+- [#3456](https://github.com/clojure-emacs/cider/issues/3456): restore 
xref-based jump-to-definition in Babashka (and any nREPL clients not having 
cider-nrepl).
 - Fix the `xref-find-definitions` CIDER backend to return correct filenames.
 - Fix the `cider-xref-fn-deps` buttons to direct to the right file.
 - Fix the `cider-find-keyword` overall reliability and correctness, 
particularly for ClojureScript.
diff --git a/cider-xref-backend.el b/cider-xref-backend.el
index 752162098d..57954df147 100644
--- a/cider-xref-backend.el
+++ b/cider-xref-backend.el
@@ -42,7 +42,11 @@
   "Used for xref integration."
   ;; Check if `cider-nrepl` middleware is loaded. Allows fallback to other xref
   ;; backends, if cider-nrepl is not loaded.
-  (when (cider-nrepl-op-supported-p "ns-path" nil 'skip-ensure)
+  (when (or
+         ;; the main requirement:
+         (cider-nrepl-op-supported-p "ns-path" nil 'skip-ensure)
+         ;; the fallback, used for bare nrepl or babashka integrations:
+         (cider-nrepl-op-supported-p "lookup" nil 'skip-ensure))
     'cider))
 
 (cl-defmethod xref-backend-identifier-at-point ((_backend (eql cider)))
@@ -91,7 +95,6 @@ These are used for presentation purposes."
 (cl-defmethod xref-backend-definitions ((_backend (eql cider)) var)
   "Find definitions of VAR."
   (cider-ensure-connected)
-  (cider-ensure-op-supported "ns-path")
   (when-let* ((loc (cider--var-to-xref-location var)))
     (list (xref-make var loc))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]