Asynchronous Clojure Interactive Development
Acid.nvim is a plugin for clojure development on neovim. It was initially designed within iron.nvim, but evolved to be a proper clojure plugin for neovim.
It is built fundamentally on neovims async capabilities and rely deeply on clojures refactor-nrepl and nrepl-python-client.
First, install the python dependencies:
pip3 install --user neovimUpdate your ~/.lein/profiles.clj adding the following lines:
[refactor-nrepl "2.3.0-SNAPSHOT"]
[cider/cider-nrepl "0.14.0"]Then, add and install acid:
Plug 'clojure-vim/acid.nvim', { 'do': ':UpdateRemotePlugins' }Acid is a remote plugin. This means it communicates with neovim using the rpc interface.
Acid has some commands for interacting with the nrepl.
Currently, there is no documentation for those commands, but a few are worth mentioning here:
<leader>NCreates a new fileKShows documentation for the symbol below cursorcarRequires current filecaRRequires dependency line below cursor (i.e.[clojure.string :as str])guShows usage of symbol below cursorgdGoes to definition of symbol below cursorcp<motion>Sends the block to nrepl for evaluationcppShorthand mapping for evaluating the whole block below cursor (up until the outermost)
All those are defined as Commands as well:
AcidNewFile <ns.file>Creates a new file under supplied ns.name.AcidNewFilePromptPrompts for the full filename for creation.AcidLoadAllLoads all project namespaces into the nrepl for easier navigation.AcidRequire [<require> [<options>]]Requires a namespace.- If no parameters supplied, loads current ns.
- Arguments supplied can be the same as a require vector, taking options:
AcidRequire clojure.string :as strAcidRequire clojure.string :refer [join]
AcidDoc <ns/symbol>Shows the documentation of the supplied symbol.
There are a few more which are unstable and/or incomplete.
Take a look at the design page for a better understanding on how acid works.
Acid is growing up in both complexity and features and there is still a lot of work to be done. Please take a look at the TODO for the roadmap.
