This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (4)
- # beginners (111)
- # boot (34)
- # cider (67)
- # cljdoc (10)
- # clojure (90)
- # clojure-dev (37)
- # clojure-europe (3)
- # clojure-gamedev (3)
- # clojure-italy (18)
- # clojure-losangeles (2)
- # clojure-nl (27)
- # clojure-spec (24)
- # clojure-uk (59)
- # clojurescript (41)
- # cursive (32)
- # datomic (31)
- # emacs (21)
- # figwheel (1)
- # figwheel-main (2)
- # fulcro (43)
- # graalvm (6)
- # graphql (3)
- # jobs-discuss (3)
- # kaocha (1)
- # nyc (1)
- # off-topic (22)
- # pathom (10)
- # pedestal (11)
- # re-frame (9)
- # reitit (17)
- # shadow-cljs (15)
- # spacemacs (13)
- # sql (6)
- # testing (5)
- # tools-deps (3)
- # vim (13)
- # yada (1)
clojure-lsp is a clojure lsp server that works with lsp-mode in emacs (hosted by the same github group)
@richiardiandrea Someone from
dap-mode reached out to me once, but I don’t remember the details.
It definitely seems cool and straightforward, maybe for Cljs and Clojure the protocol could be the same
Did I read somewhere that there was a cider command for evaluating expressions inside a thread first / thread last?
i think @richiardiandrea added a command to close as many parens as needed and eval?
The magic commands are
cider-xref-fn-deps. There are no keybindings or documentation at this point, and there’s plenty of room for improvement.
looks like you listed jeff valk as the author of
cider-xref.el. unintentional or was this file created from his stuff?
I first thought of just dumping a list of paths with references, but because we don’t get the location of the reference itself, but that of the containing function I thought that UI made more sense.
this works finding y as a ref for x. but on non-trivial stuff nothing so far
(defn x  2) (defn y  (x))
@nicholas.jaunsen some linters are orthogonal to cider, e.g. joker or clj-kondo, they don’t need a JVM. But Eastwood does and I don’t know if that has CIDER integration.
I've looked at Eastwood before, but it doesn't have proper flycheck support so I can't integrate it with emacs. I would like to see the linting errors in emacs.
@nicholas.jaunsen joker is awesome. clj-kondo is pretty new, but can find stuff that joker cannot. I use them at the same time with flycheck
for joker you’ll need: - https://github.com/candid82/joker - https://github.com/candid82/flycheck-joker for clj-kondo: - https://github.com/borkdude/clj-kondo/blob/master/doc/install.md - https://github.com/borkdude/flycheck-clj-kondo The elisp snippet to turn them on both in flycheck is at the bottom of the README of flycheck-clj-kondo.
@bozhidar i know you know but clojure-lsp's find usages is pretty good. has rename too btw
> @bozhidar i know you know but clojure-lsp’s find usages is pretty good. has rename too btw
yeah that makes sense. only if you loaded the ns why not just use tools.anal.jvm? ;) (jusf pulling the leg, sry)
I'd love to press the repl driven attempts upstream a little, get the core team helping us out with potential changes to clojure(script).
You might file a few tickets to start some conversation going. What changes do you have in mind?
Well, I did wonder if we could store the line number and column alongside the field in the function. That would make it possible to jump to uses exactly.
> Well, I did wonder if we could store the line number and column alongside the field in the function. That would make it possible to jump to uses exactly.
I guess that should be some list of positions, as you can have several references to the same function.
If there’s some sane way to get nested lambdas that’d be awesome as well. I haven’t had time to test if we can extract those from the classpath yet.
funny I was just checking that but the new consolidated
info should return meta for both clj and cljs (using the compiler state)
That’s not what we’re discussing with @dominicm. The
fn-refs function can find references, but it can’t tell you where exactly they are in the body of a function. Different kind of metadata.
Btw, I have no idea what keyboard prefix to use for the xref commands - too many keybindings are already taken. If someone has great ideas - be my guest. 🙂