Clojure Sublime Text Setup

Clojure Sublime Text SetupThe goalNotesWhat you will needPreferred for this guideSocketCLJ KondoParinferBonus featuresVlaaad/RevealVim keysArcadiaTheming

The goal

 

 

Notes

This is a very minimal setup and probably not a good candidate for your only editing environment, but likely will pair nicely with Cursive/Emacs for more heavy weight work

What you will need

Preferred for this guide

Socket

Install socket into Sublime Text 3:

In order to connect a REPL run the following on the terminal:

This opens a socket REPL, in Sublime Text open the command palette and find Socket: New you will be prompted for the following, change the values to the following:

You should now have a REPL prompt in a new panel within Sublime Text

Very importantly check out the default key-binds here:

More details: https://github.com/nasser/Socket

CLJ Kondo

Install Kondo by going to https://github.com/borkdude/clj-kondo/releases and download the file that sounds like clj-kondo-lsp-server-2020.03.20-standalone.jar and place it inside a folder that you can use to refer to it later

Use Package Control to install sublimelsp/LSP open the Preferences > Package settings > LSP > Settings which will open LSP.sublime-settings

Paste the following inside:

After that open the command palette and press LSP: Enable Language Server Globally and find clj-kondo in there and this will enable static analysis for you in all Clojure scopes

Parinfer

Install the Printer package from package control via oakmac/sublime-text-parinfer after installing if it's not working try opening the command palette and running Parinfer: Enable / Toggle Mode

 

Bonus features

Vlaaad/Reveal

The REPL that we have is quite basic in that it's a text buffer in Sublime Text but what if we want to click into nested data? We can use an alternative GUI for our socket REPL: https://github.com/vlaaad/reveal whilst still benefiting from our key-binds like send block to REPL

Screenshot 2020-03-23 at 14 06 22

Run the following command when opening a new REPL and we can use reveal immediately:

Vim keys

Using package control install NeoVintageous the vim keys work pretty well and work in the socket REPL and Parinfer, Parinfer and Vim keys don't work well together in VSCode

Arcadia

The socket plugin has Arcadia integration built in, something I struggle with when using Cursive, since the projects share authors this might be quite smooth although likely basic (I have not tried this yet)

Theming

I'm using soda-theme found on package control, with this file:

Soda Dark 3.sublime-theme inside my Sublime user folder, this themes the title bar:

The rest of can be achieved by toggling off minimap, tabs etc in the command palette, & source code pro font with ui scaling