Fork me on GitHub
#emacs
<
2022-06-15
>
Drew Verlee19:06:43

how do you get emacs and cider to respect project specific java versions?

Ben Sless14:06:15

I usually use jenv

Drew Verlee02:06:06

@UK0810AQ2 can you give me an example? I set my local jenv to 1.8 but cider jack in still gives me 1.11

Drew Verlee02:06:38

Does jenv just add .java version file?

Ben Sless03:06:40

In the project you need to run jenv local VERSION and it'll create a file pinning it locally

Drew Verlee13:06:58

@UK0810AQ2 jenv local version is run from the project root directory and cider-jack-in from emacs still picks up a different version. Are you getting different behavior?

Ben Sless13:06:35

What is the java command your emacs figures out?

Ben Sless13:06:43

Maybe it's not using the jenv shim

Cora (she/her)19:06:37

you could use https://github.com/purcell/envrc and set the right env vars in a .envrc

👀 3
👍 1
Drew Verlee02:06:47

This looks promising. Ty ty 😃

Drew Verlee23:06:57

@U02N27RK69K this seems to work well enough for env vars and .evrc. ty very much.

🎉 1
Hermann07:06:27

If you want to take this one step up, you could combine it with nix to wrap all dependencies project-wise