Fork me on GitHub
#cider
<
2019-07-12
>
iagwanderson02:07:43

hi ppl, is it possible today to add a dependency in project.clj (even through cljr-refactor) that reloads the repl automatically?

jonpither11:07:02

Any intel on a release date?

stacktracer13:07:03

Is it possible to get cider autocomplete working in a codebase with a Maven POM rather than a lein project.clj? (... I have cider connected to an nrepl instance that I started from the CLI, and autocomplete works in the cider repl. But no autocomplete when editing a file. The file buffer modeline says "Clojure cider[clj:<no project>@:proc:nrepl-connection]".)

bozhidar13:07:43

You can manually associate the entire folder of the project with the session of your REPL connection and that should work.

bozhidar13:07:27

A real solution would be to teach clojure-mode (and CIDER by association) about Maven projects. And maybe even implement cider-jack-in for them.

stacktracer14:07:05

@bozhidar sesman-info says my file buffer is associated with my nrepl connection (which is linked to the project dir, as you suggest) ... but still no autocomplete in the file buffer

stacktracer14:07:37

Maybe I'll try putting a project.clj in there, just to see if that's really the problem

bozhidar15:07:53

I’m puzzled - how can it be linked to the project is it thinks there’s no project? 🙂

bozhidar15:07:27

Btw, have you evaluated the namespace with C-c C-k first?

stacktracer15:07:11

Victory! I installed and turned on company-mode, and its autocomplete works. Not sure why the standard autocomplete wasn't working.

stacktracer15:07:07

Also, you correctly anticipated my next question, which was going to be why it couldn't autocomplete symbols from the file itself. Brilliant!

stacktracer15:07:26

I'm starting the nrepl server with the project dir as CWD. The file I'm editing is underneath that project dir. Once I do "cider-connect," sesman seems to be smart enough to hook up the file to the nrepl connection.

stacktracer15:07:09

Thanks @bozhidar!

nicholas.jaunsen17:07:26

According to the cljfmt readme CIDER0.9+ has cljfmt integration, but I can't find anything about formatting code in the CIDER docs.

jr0cket17:07:46

I am unsure there is much to say. Basic formatting just happens as you type or press TAB. With Spacemacs I use agressive indent and automatic alignment https://practicalli.github.io/spacemacs/improving-code/formatting/