This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-14
Channels
- # adventofcode (1)
- # babashka (60)
- # beginners (107)
- # calva (11)
- # cider (3)
- # clara (11)
- # clj-kondo (6)
- # cljs-dev (33)
- # clojure (70)
- # clojure-dev (4)
- # clojure-europe (3)
- # clojure-italy (2)
- # clojure-kc (1)
- # clojure-losangeles (12)
- # clojure-nl (4)
- # clojure-spec (32)
- # clojure-uk (35)
- # clojuredesign-podcast (1)
- # clojurescript (28)
- # core-logic (4)
- # cursive (5)
- # datomic (34)
- # devcards (1)
- # emacs (16)
- # events (13)
- # fulcro (15)
- # graalvm (5)
- # graphql (3)
- # jobs (8)
- # joker (2)
- # kaocha (17)
- # malli (6)
- # music (3)
- # off-topic (58)
- # protorepl (7)
- # re-frame (28)
- # rewrite-clj (9)
- # shadow-cljs (102)
- # spacemacs (3)
- # sql (20)
- # tools-deps (9)
tiny helper but incredibly useful for me
(require 'dumb-jump)
(defun cider-or-dumb-jump ()
(interactive)
(if (cider-connected-p)
(cider-find-var)
(dumb-jump-go)))
(add-hook 'clojure-mode-hook
(lambda ()
(local-set-key (kbd "M-.") 'cider-or-dumb-jump)))
Falls back to the dumb jump library if cider is connecter
I heard that spacemacs does this by default, I should steal more from them
IIRC there's a package, smart-jump
, that takes this approach for all modes. Might be worth making a PR.
It's integrated already: https://github.com/jojojames/smart-jump/blob/master/smart-jump-clojure-mode.el#L45
Well probably not it just jump around your local code
It's not the same as the cider option of course, but useful on big projects you're just browsing when you don't want a repl
i've tried lsp, but am not big on the having to run additional servers approach. i didn't have success with dump-jump for working with identifiers in dependencies and wrote something that uses clj-kondo to create TAGS files -- it covers the project as well as the dependencies. it's taking a bit longer than i was hoping in order to handle namespace and alias prefixes, but a friend and i are finding it to be useful.
wanted to know though if someone did get dump-jump working, because it would be less work 🙂
Ah nice, can you share some code @sogaiu?
@andrea.crotti if you don't mind some rough edges: https://gist.github.com/sogaiu/6cb947b00ae13d00d4ae16ab7aaf97e4 -- if you try it out, i'd be interested in hearing about your experience. working on improving it, but it's a bit slow-going 🙂
(on a side note, with the advent of clindex, i wonder whether that couldn't be used to create TAGS/tags)
IIRC there's a package, smart-jump
, that takes this approach for all modes. Might be worth making a PR.
It's integrated already: https://github.com/jojojames/smart-jump/blob/master/smart-jump-clojure-mode.el#L45