As per title.
I’m a (maybe the?) full-time Clojure dev that uses a Kakoune-based setup.
Without a lot of custom work, you’re certainly not going to get the polish of an emacs, cursive, or calva setup. But IMO you can get far enough for it to be worth it if you’re comfortable with Kakoune, unix terminal tools, and the Clojure ecosystem.
The core of my Kakoune setup for working in Clojure involves:
- kakoune-lsp + clojure-lsp: Intelligent language editing features via LSP
- kakoune-repl-mode: Better integration with a terminal REPL instance
- (relies on tmux integration)
- parinfer-rust: Dynamic s-expression editing
- I would prefer paredit, but this was all there was when I first set this up, and as far as I know, that continues to be the case.
- Works great once you get used to working with it, and are aware of cases when it will cause issues (experience reveals these). I have mappings to toggle between the modes and, for example, a hook to disable this on undo.
- rep: A single-shot nREPL client designed for shell invocation
- I have mappings for executing the selection or file via
rep
. - I have Portal setup with the nRepl middleware so that the results of each eval is displayed in a Portal window.
- I have mappings for executing the selection or file via
- kak-rainbow: rainbow parens
Some of stuff I have for reference…
Warning: none of this is perfectly polished, or kept up to date, but it may get you further than without:
- You can reference the above notes, with some other misc stuff in this pseudo-plugin here:
GitHub - jordan-yee/kakoune-clojure: A Kakoune plugin that improves the experience of working with Clojure code. - Link to the
kakoune-lsp
plugin setup in my kakrc here:
dangerscripts/kakoune/kakrc at 76be6f63fd694c798b59f31be9287c1c263b5e30 · jordan-yee/dangerscripts · GitHub- Mostly, it shouldn’t be hard to follow the setup instructions for each of the components listed above to incorporate them into your own setup.
- Link in same file to Parinfer setup
- Link in same file to Rainbow Parens setup
- You can scan it or ctrl-f for other relevant sections.
4 Likes