This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-18
Channels
- # announcements (26)
- # beginners (107)
- # calva (26)
- # cider (55)
- # clj-kondo (7)
- # clojure (115)
- # clojure-europe (6)
- # clojure-houston (3)
- # clojure-italy (4)
- # clojure-nl (16)
- # clojure-norway (1)
- # clojure-uk (42)
- # clojuredesign-podcast (3)
- # clojurescript (47)
- # clojutre (4)
- # cursive (7)
- # datomic (75)
- # fulcro (1)
- # graalvm (3)
- # graphql (16)
- # jobs (1)
- # jobs-discuss (13)
- # keechma (1)
- # leiningen (19)
- # luminus (5)
- # off-topic (33)
- # pathom (16)
- # re-frame (76)
- # reitit (4)
- # ring (5)
- # shadow-cljs (86)
- # spacemacs (52)
- # tools-deps (43)
- # vim (7)
- # yada (1)
Has someone ever head problems with env vars in Spacemacs, more specifically JAVA_HOME
?
I'm not sure when that started to happen (can be a few days ago) but suddenly my JAVA_HOME is set to 1.8 although I use 11 almost everywhere.
I'm on Mac OS X.
I certainly have such 11 set in my shell and even in the OS environment it seems (e.g. HelloWorld run in Intellij IDEA reports 11).
I use jenv
to manage java home and event set it in /Library/LaunchDaemons/setenv.java.plist
Spacemacs has a .env file that contains the env variables and values it „sees“. These are not the ones you set in your shell.
@U06BE1L6T first SPC f e C-e
, then SPC f e e
- check if JAVA_HOME is there
I think it used to work properly with jenv - e.g. when I ran the repl in a directory where jenv local version was 1.8 it used 1.8. For other projects it used 11
I actually think I might have executed force-init-spacemacs-env
accidentaly in the past
Hm, still doesn't work as expected. It's setting duplicate JAVA_HOME values. Maybe I need to do this somewhere in emacs config:
echo 'eval "$(jenv init -)"'
This is what I have in my /etc/profile:
eval "$(jenv init -)"
eval "$(jenv enable-plugin export)"
No luck, very frustrating 😞. It used to work just fine - proper java version was picked up as per jenv settings (as in terminal).
It sounds like you have different Java settings between shell and login shell. I.e a terminal has one setting and gui apps have another
That might be true since it's notoriously hard to set this in Mac OS, but at least InteliJ IDEA seems to have the right setting
I'm using this jenv
thing and its exporter plugin and also setting it in /Library/LaunchDaemons/setenv.java.plist
But now I kept that file and just removed all the content and it's at least using the proper global JDK (11)
but it still doesn't work with "local versions" that is for projects that have different java set locally with jenv (like 1.8)
Have you looked at section 11 of http://develop.spacemacs.org/doc/DOCUMENTATION.html
it seems I need to do this trick with:
eval "$(jenv init -)"
eval "$(jenv enable-plugin export)"
@U05254DQM not yet, will check it
I'm now trying the latest develop version. It's been a long while since I updated it the last
After removing JAVA_HOME related stuff from .spacemacs.env
, removing everything from various .plist
files (/Library/LaunchDaemons/setenv.java.plist, /.MacOSX/environment.plist, /Library/LaunchAgents/environment.plist) and restarting my computer a couple of times it finally works as before!
Thanks everyone for your help
I also added the jenv init code (see above) to .bash_profile
but not sure if that had any effect at all.
general emacs question, has anyone found a way to fold jsx? e.g <div> <h2>*
pressing fold at h2 would collapse everything inside of it. I really like being able to look at as little code as possible, i'm willing to use other methods beyond fold to achieve that. RIght now the fold function i use folds all the jsx into one ... fold.
in that same vein, but for editing clojure, i feel like i could probably use something more powerful then fold. Like a focus, that hid everything on the page except the s-expression i picked.
maybe a heavy blur on other code
maybe intelliji does this 😏
@drewverlee SPC n f
will give you exact focus on the current function under the cursor. I use narrowing mainly for find/replace, but could be useful for focus.
You can also narrow to page or region.
SPC n w
to restore the full view.
thats cool
Yes, it's something lisp developers have used a lot
awesome! thanks a lot for putting this together and answering questions on slack.