Clojure REPL IntelliJ plugin & LazyVim Config for Neovim
Very tired this week, probably from all the exercise in the last two weeks catching up to me. After taking it easy and catching up with various Star Wars series I started to have a lot more energy by the weekend.
LazyVim is another community configuration for Neovim, its quite nice out of the box and has a 'Clojure extras' with Conjure support.
Looking for an icon to represent a project maintainer, I browsed through the GitHub Octodex that contains a wide variety of Octocat design images.
Backing up the last couple of projects on the Lenovo Extreme and will give ... a quick try before installing Debian Linux.
IntelliJ IDEA editor hasnt been on my radar for a long time until a friend reached out via Clojurians slack about the Clojure REPL and Clojure LSP plugins for Intellij. These open source plugins are a very interesting alternative to the commercial Cursive plugin. I took IntelliJ and these new plugins for a quick test run and liked the results.
Its self-assessment time and hopefully I can get a little tax back from the UK government, expecially as I did a nice pension contribution and didnt work a full tax year.
My local Co-op has been very short of supplies for the last few of weeks, something I havent seen since the UK left the European Union. Reading the result of the Co-op annual general meeting there was a link to message from the CEO about a Cyber Incident.
It seems the Co-op systems were hacked and deliveries to Co-op stores were greatly affected, so there were very few products on the shelves. Deliveries have apparently resumed now, although I have enjoyed walking down to Waitrose instead.
I did another order for organic hemp seeds, walnuts, peauts, jumbo oats and dried apricots from Forest Whole Foods.
Neovimλ︎
Although I have really enjoyed using AstroNvim, some of the Astrocommunity can be quite grumpy at best and not that communicative. It is always useful to check I have build my config on the right framework.
I've wanted to try out LazyVim community config for a while and it does make more use of the Snacks quality of life plugins. First impressions were it looked very nice and had Clojure support.
LazyVimλ︎
Cloned the config to ~/.config/nvim-lazyvim/
Already had lazyvim
alias defined in ~/config/shell-aliases
Running lazyvim
command started Neovim and downloaded all the plugins and compiled treesitter.
On the dashboard there are more commands than the AstroNvim config, including x
for Extras. The Extras are plugins and config on top of the Lazy.Vim config.
The Clojure extra provides treesitter support, completion, paredit (nvim-treesitter-sexp) and of course Conjure.
Testing the Clojure extra worked well although diagnostics were not showing. The Clojure extra does not include install of the Clojure LSP server via mason. SPC c m
opens mason and clojure-lsp
was installed.
The Clojure extra includes nvim-treesitter-sexp plugin which errors when used by Neovim 0.11.0. Issue #5866 was raised on the LazyVim GitHub repository and PR #5876
The PR doesnt include changes to the LazyVim website, which is managed by another repository. If the PR is accepted then the Clojure extra web page should be updated.
I had to look up how to save a file (whist writing this journal entry with LazyVim) which was C-s
although that didnt feel very Neovim like.
There are some nice touches in LazyVim
- noice installed by default for nicer command prompt, etc
- lsp using fancy dialog pop-ups for warnings
- which-key shows in helix form
- snacks toggles added to which-key UI toggles keymaps
- folke/trouble-nvim for pretty diagnostics
Some things that feel weird:
\
used for local leader rather than,
C-s
for file save feels a little weird (although I realise this is common in Neovim as its also in AstroNvim) -SPC s
is way easer though.- some key bindings are not that intuitive, although many are the same as AstroNvim
- completion popups do not use
tab
select an entry (although this seems similar to AstroNvim so related to the switch to blink) SPC backtick
used to switch to previous buffer (although I had to addSPC TAB
in my AstroNvim config)
Concerns:
- issues and pull requests seem to have built up and not being addressed. Is this config actively maintained?
Astro5λ︎
The in-line LSP diagnostics warnings in LazyVim were from the trouble-nvim plugin. I tried trouble-nvim with AstroNvim and it worked for Clojure files tool.
Reverting back to tiny-inline-diagnostic.nvim plugin and toggling visual lines twice, this worked for clojure (EDIT: actually it seems it didnt). It was already working for lua, but not sure why it wasnt working for Clojure previously.
Update: toggling diagnostics , SPC u d
, is required to see the tiny-inline-diagnostics UI. Visual text should not be enabled otherwise there will be duplicate diagnostic messages.
Will keep testing the tiny diagnostics to see if they are reliable, as they are very visually appealing. It will be good to try out the available presets too to see if the 'modern' default is the clearest.
tiny-inline-diagnostic preset config
Intellij IDEAλ︎
There are two community plugins created for IntelliJ IDEA which seem an interesting alternative to the Cursive commercial product.
I also wanted to discover if there was good vim-style editing support for IntelliJ. Without this then I couldnt use this tool for serious work.
First I have to get over the hurdle of installing IntelliJ IDEA :) It has been over a decade since I used it and my experience back then was not that impressive.
Installλ︎
The latest IntelliJ community edition of IDEA was downloaded, although it took a few clicks to find it as IntelliJ really want you to download the full licenced prodcut.
The download is a tar file, so I extracted the archive to ~/.local/app/intellij/idea-IC-251.25410.129/
A symbolic link called indea-IC-current
was created for this directory, to make upgrading simpler. When adding a new version I only need to update this symbolic link and I have a new version. Its also easy to switch between two versions by deleting and recreating the symbolic link.
I created a shell script to change directory to intellij install and call its idea.sh
launch script. The Install-linux-tar.txt file states that this is the file to use for Linux (EDIT: turns out it isnt).
The experience is much better than I remember and the splash screen and IDE loaded pretty quickly. The IDE doesnt have a project open, so there is no code analysis, which always took a long time.
There were warnings I was a little confused about on the welcome page
- input methods disabler: what input methods could cause freezes to the ide I couldnt imagine)
- ide launched with a script: the Install-linux-tar.txt that ships with idea says to use the script, so surprised to see a warning saying I shouldnt use it...
I created a symbolic link from ~/.local/bin
directory which is already on my operating system PATH.
NOTE: The input methods disabler seemed to go away after restarting IDEA with the
idea
binary, rather than theidea.sh
Clojure supportλ︎
A search for clojure
in the plugins section of IDEA didnt return results.
Clicking on the link to the Marketplace in the results pane did show several results.
Clojure LSP & Clojure REPL are the two open source projects that are an alternative to the commercial cursive project. Installing both plugs requres a reboot of IDEA.
Prtal Inspector plugin will embed a Portal window inside IntelliJ IDEA. Seems useful if your entire screen is taken up with IntelliJ, not so much if you have portal running separately, e.g. on a different screen
NOTE: Clojure-Kit which seems abandoned since the last release in 2021. Issues havent been discussed and the README wasnt updated to support Clojure CLI and not commits
I opened a project created from the :practicalli/service
template (deps-new tool) that has a deps.edn file and enough code to run a web service providing an API (reitit & swagger).
The project loaded at a fairly good speed. Not quite as fast as in Emacs or Neovim, but only a few seconds behind as the code was being analysed.
The instructions on the Clojure RPEL plugin page were not exactly the same. Clicking on Current File > Edit configurations...* (instead of Run > Edit Configurations)
Running a clojure projectλ︎
To run the REPL, first create a Run Configuration. The docs say to create a Local REPL run configuration which defines which command line tool to use to start the Clojure REPL, e.g. Clojure CLI or Leiningen.
Aliases can also be included in the Run configuration. I tried one from the project and will try another from the user configuration, e.g. Practicalli Clojure CLI config
Once a Run configuration has been created, Clojure REPL seems to work just like cider (not surprising as it is trying to emulate that experience and uses some of its libraries).
Issue #150 add clojure cli aliases before :cider/nrepl
Alias added at the end instead of between the -M
flag and :cider/nrepl
alias.
Starting nREPL server via: clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version \"1.3.1\"} cider/cider-nrepl {:mvn/version \"0.55.7\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" -M:cider/nrepl::repl/reloaded
---------------------------------------------------------
Loading custom user namespace tools...
---------------------------------------------------------
---------------------------------------------------------
System components:
(start) ; starts all components in system config
(restart) ; read system config, reloads changed namespaces & restarts system
(stop) ; shutdown all components in the system
(system) ; show configuration of the running system
Hotload libraries: ; Clojure 1.12.x
(add-lib 'library-name)
(add-libs '{domain/library-name {:mvn/version "v1.2.3"}})
(sync-deps) ; load dependencies from deps.edn
- deps-* lsp snippets for adding library
Portal Inspector:
- portal started by default, listening to all evaluations
(inspect/clear) ; clear all values in portal
(remove-tap #'inspect/submit) ; stop sending to portal
(inspect/close) ; close portal
Mulog Publisher:
- mulog publisher started by default
(mulog-events/stop) ; stop publishing log events
(help) ; print help text
---------------------------------------------------------
Set REPL refresh directories to (src resources)
May 24, 2025 3:14:18 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
;; Connected to nREPL server - nrepl://localhost:34967
;; Clojure REPL Intellij 2.5.3
;; Clojure 1.11.2, Java 21.0.7, nREPL 1.1.0
;; Startup: clojure -Sdeps {:deps {nrepl/nrepl {:mvn/version "1.3.1"} cider/cider-nrepl {:mvn/version "0.55.7"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}} -M:cider/nrepl::repl/reloaded
Execution error (ExceptionInfo) at rebel-readline.jline-api/assert-system-terminal (jline_api.clj:53).
Unable to detect a system Terminal, you must not launch the Rebel readline
from an intermediate process.
If you are using `lein` you may need to use `lein trampoline`.
Full report at:
/tmp/clojure-14729355977801168601.edn
*** Closed on 24/05/2025 15:14:19 ***
Vim-style editingλ︎
IdeaVim plugin looks very promising. Not only does it have all the navigation and motions of vim but it can also drive the features of IDEA itself.
Self Assessmentλ︎
Its that time of year again to assemble all the documentation for a self-assessment application. As I occasionally earn salary that is taxed at the higher rates, then personal pension and charity donations provide for some tax relief.
For the amount of salary that was charged at 40% tax, I can claim 20% back up to the amount of personal pension contribution.
I have a very nice accountant that checks I have provided all of the information and calculates the expected return I should receive from the UK government.
Bank account interest is not taxed at source, so I do need to report interest earned. Finding bank statements for online banks that only have apps was a little tricky, although I found what I needed.
The Monzo app had a link in its Help menu called See your interest statement which open up a list of annual statements for each tax year. Selecting the 2024-25 tax year opened a PDF file which I saved to Google Drive so it could be accessed via my computer.
The Tandem app is very minimal. In the Profile menu there is an Important Documents section which contains a Savings certificates section, listing the annual certificate of interest for each savings pot.
Thank you.