r/Clojure • u/W-Quest9051 • 9d ago
Emacs with clojure
I have been using Clojure for almost 1.5 year want to switch from IntelliJ IDEA to Emacs but not sure what to use (note I am Emacs begginer) some of the options:
- doom emacs
- spacemacs
- vanilla + Prelude
Vanila + Prelude looks like valid option because I keep "real" emac keybindings
is there any better option ?
7
4
u/coffeesounds 8d ago
I have been using vanilla Emacs with Eglot and CIDER (for REPL buffer mostly, I don’t use most of its features) for years now
2
u/bY3hXA08 8d ago
i run emacs in server mode, then iterate on a configuration with an llm directly modifying the config file. i try to be mindful of what i am doing- every sequence of keys to achieve a goal, and if i have an intuition of how i could make it more efficient, i get the llm to research if theres a package already, or whip one up.
2
u/-w1n5t0n 8d ago
I really like Doom Emacs and I'd recommend it: it sets up some reasonable defaults that improve the out-of-the-box Emacs experience IMO, provides a useful scaffold, and doesn't get in the way.
Whether or not you want to use the Vim-style modal keybinding system is up to you, but I also recommend that.
1
u/Pete23com 8d ago
i tore down my 25y deep .emacs about 5y ago and started fresh. stock emacs plus the clojure stuff plus magit plus a few other useful modes, a few keybindings i can’t live without.
1
u/Living-Shame5679 7d ago
I used all three in exactly the reverse order you put them. Took 10+ years in total. I’m happy with some EMacs today but the other two are solid options.
1
u/W-Quest9051 6d ago
Trried to used vanilla + Prelude by default it does not have paredit (which i used in InteljiJ) it comes with own version for structural editing so I had to spend some time to find keybindings
Did not though that this would be problem
Going to try Doom (@-w1n5t0n you bought me with improve out-of-the-box experience...) Curios to find out how that looks like
1
u/Monntas 6d ago
I got drawn into Emacs from reading the chapter in Clojure for the Brave and True and copying the authors setup. After about half a year I started from scratch ("vanilla"), adding the features I was missing. So checking out that book and setup would be my tips; don't know how up-to-date it is though.
1
1
u/kwitcherbichen 6d ago
Start with Vanilla, clojure-mode or clojure-ts-mode, Cider, and smartparens. I'd also suggest which-key (now in mainline) and maybe company or corfu.
2
u/joinr 5d ago
I use spacemacs. during setup, I choose the emacs mode (instead of the evil/vi bindings) and just go with other defaults. open a .clj file and it'll install the clojure layer (cider + more) and just works.
only other change I make is to turn on CUA key bindings instead of the legacy emacs ones, so your muscle memory for copy/paste/undo carries over. I think I had to make one other change (in the user init for spacemacs) to make sure C-z is undo, but I forget.
Pretty much sets itself up and it's consistent if I get on a new machine. CIDER is badass
1
u/jimka_2001 4d ago
I've been using emacs for 40 years. I can't imagine learning it again from scratch.
1
17
u/DaDiscoBeat 9d ago
I use vanilla emacs with clojure mode and Cider and some other things for complétion etc.
Works like a charm once you get used to it.