Hi there, let's say I want to embed my nrepl in the app. Then I want to be able to connect to it from either Calva or Cider (depending on the developer). Do they both support .nrepl.port
?
thank you both, I did not notice that Calva page π
Where in Calva do you see nrepl-port
?
Also, is there a reason you are not using jack-in?
about the latter, yes - there is a lot of output from the app and a terminal suits us better π
about the first question - maybe there is a mistake in that doc cause I see the right name under "Connecting"
found -> here it says nrepl.port
https://calva.io/connect-sequences/#settings-for-adding-custom-sequences
Just FYI it does not see that customizing the REPL port file works
what are you doing?
oh it does ... sorry I needed a vector lol
this works "nReplPortFile": [".nrepl-port"],
oh for customizing calva?
A bit of bad naming thereβ¦
@richiardiandrea The only place I see nrepl-port
mentioned is for shadow-cljs, which actually names it like that. Is there some other place it says that?
that's the only place I saw that - and it confused me but maybe it's just me ... π
I have everything fully working and very smoothly now π
Awesome!
@dpsutton yes my app now launches the nrepl server and writes the file (in dev mode). Calva picks the port from it when doing Connect to an existing REPL in project
The internal terminal i VS Code is pretty good, btw. And there is this button where it can be maximized and restored quickly. So to me jack-in makes sense since it uses this terminal. Just saynβ π
I like that you can customize the project name thanks to calva.replConnectSequences
very nice to your lil' custom menu π
oh I found it also here https://github.com/BetterThanTomorrow/calva/blob/published/src/nrepl/connectSequence.ts#L126
and yes, it seems like I am back to doing Clojure π
are you asking if starting an nrepl server uses the port found in .nrepl.port
or if when it starts it will write a file with the port its using into .nrepl.port
I think I answered by checking the start-server implementation...it does not save the file automatically unless launched via cmd line... I was more wondering if both editors can read that file
Calva looks for different nrepl port files depending on project type. This can also be configured using custom connect sequences: https://calva.io/connect-sequences/
i thought CIDER just watches the server output for a regex to grab the port. when you cider-connect it will just ask i thought. forgot how that works and if it actively looks for that file on cider-connect
yeah cider will look for that file if it exists
i'm guessing its just the port in there? should be simple enough to spit that out when you start your server if you want
there's a delete on done option for files that will make sure to clean it up too to prevent it from laying around