braveclojure / babooka

https://www.braveclojure.com/quests/babooka/
58 stars 7 forks source link

chapter about nrepl support? #6

Open brdloush opened 1 year ago

brdloush commented 1 year ago

Hello, have you considered adding a chapter about bb --nrepl-server ?

For me, the support of nrepl in babashka is yet another game-changer that babashka brings to the table. It's really awesome to be able to code fully interactively in your favourite editor, being connected to bb process internally running nrepl server.

Sometimes, if I need "full clojure experience" (better editor support - especially docs popups), I also use bb --print-deps > deps.edn, and code the script using regular clojure repl+nrepl. Then, once I'm happy with the result, I turn back to the bb and make sure the script is still bb-friendly.

brdloush commented 1 year ago

Hmm.. I guess it's probably not necessary to actually switch to clojure repl in order to get docs popups in the editor. It seems that presence of bb-generated deps.edn is just enough for clojure-lsp / clj-kondo to be able to provide docs info to your editor (at least in calva). I'll try to use just bb --nrepl-server + deps.edn the next time I'm creating something from scratch.

borkdude commented 1 year ago

bb.edn also works for calva and lsp if you don't want to have those deps inside a deps.edn

borkdude commented 1 year ago

In fact, an empty bb.edn should already work, since bb.edn is used by lsp to detect the project root and then it calls print-deps to get more info about the built-in dependencies.

geraldodev commented 1 year ago

I tried with calva and nvim. An empty bb.edn. It had {} on the root folder made lsp kick in.

Em ter., 24 de jan. de 2023 às 07:43, Michiel Borkent < @.***> escreveu:

In fact, an empty bb.edn should already work, since bb.edn is used by lsp to detect the project root and then it calls print-deps to get more info about the built-in dependencies.

— Reply to this email directly, view it on GitHub https://github.com/braveclojure/babooka/issues/6#issuecomment-1401716651, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF5CCB6LRDC5AVFKH5VGWDWT6W5PANCNFSM6AAAAAAUE46FH4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>