This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-02
Channels
- # announcements (7)
- # atom-editor (3)
- # babashka (8)
- # beginners (38)
- # biff (5)
- # calva (17)
- # cider (26)
- # clj-kondo (6)
- # clojure (49)
- # clojure-europe (47)
- # clojure-norway (19)
- # clojure-sweden (2)
- # clojure-uk (1)
- # clojurescript (22)
- # cursive (20)
- # datahike (1)
- # datomic (6)
- # etaoin (2)
- # honeysql (2)
- # hyperfiddle (36)
- # jobs-discuss (19)
- # leiningen (15)
- # malli (5)
- # off-topic (8)
- # overtone (1)
- # pathom (15)
- # pedestal (8)
- # polylith (4)
- # releases (1)
- # ring (5)
- # schema (10)
- # shadow-cljs (17)
- # timbre (3)
- # xtdb (17)
Well, it's not the case, you could try removing .elc files, else feel free to create an issue
You can also use the *nrepl-log*
to see whether it's a timeout, error, absence of request etc
I think something weird may be going on with .elc files as you were suggesting, now after a restart and installing clj-refactor, it's complaining about a missing clojure-mode-map variable
Doesn't ring a bell. Although it's a good idea to check that clojure-mode is latest stable
Ah, perhaps my setup was loading clj-refactor before which loaded clojure-mode before it ran:
(define-key clojure-mode-map (kbd "M-.") #'find-definition)
something like that seems to be happening. When loading clojure-mode
manually, I'm getting:
Symbol's function definition is void: cider-register-cljs-repl-type
Ah I had this:
(defun my-clojure-mode-hook ()
(clj-refactor-mode 1)
(yas-minor-mode 1) ; for adding require/use/import statements
;; This choice of keybinding leaves cider-macroexpand-1 unbound
(cljr-add-keybindings-with-prefix "C-c C-m"))
so I needed to comment out clj-refactor-mode
yeah I guess I should refactor my stuff to use use-package or so, never went through that trouble and accumulated years of junk in my emacs setup haha

It seems when I use cider-jack-in
with clojure-cli
my .dir-locals.el
is sometimes not respected. I don't start the REPL from the top of the project, but inside one of the test files. Any hints/tips?
Even when I use cider-jack-in from the top of the project, I see:
[nREPL] Starting server via /opt/homebrew/bin/clojure -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.0.0\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.44.0\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[cider.nrepl/cider-middleware\]\"\]\}\}\} -M:cider/nrepl
My .dir-locals.el has:
((clojure-mode
(cider-clojure-cli-aliases . ":repl:test")))
After running this:
(defun my-reload-dir-locals-for-current-buffer ()
"reload dir locals for the current buffer"
(interactive)
(let ((enable-local-variables :all))
(hack-dir-local-variables-non-file-buffer)))
and jacking in again, it works. Maybe my .dir-locals.el isn't read somehow?somehow now it works, but sometimes it doesn't. I guess it's Monday although it's Tuesday :)
I'd suggest running M-: cider-clojure-cli-aliases
and check its value
CIDER does nothing special/specific with .dir-locals.el, most likely that mechanism didn't do its job for whatever reason
If changes are made to a .dir-locals.el
then the current buffer must be reloaded before calling cider-jack-in command.
If switching to a buffer that was already opened, that buffer will not have the .dir-locals el
changes until it has been reloaded (or reopened)