Clojure development environment in Microsoft VScode.
- Install Microsoft Visual Studio Code via download or your package manager.
Ubuntu
snap install code
- Open vscode, go to: File > Preferences > Extensions
- List Extensions Installed
code --list-extensions
- Install an Extension by extension id - calva example
code --install-extension betterthantomorrow.calva
General Use
- Awesome Emacs Keymap (tuttieee.emacs-mcx) -> Emacs keybindings with system clipboard integration.
- GitLens (eamodio.gitlens) -> Visualize code authorship, browse repos.
- Rainbow CSV (mechatroner.rainbow-csv) -> Hightlight CSV files in different colors and run SQL like queries.
- Remote - SSH (ms-vscode-remote.remote-ssh) -> Open folders on remote machines using ssh.
Clojure
- Calva (betterthantomorrow.calva) -> Integrated REPL, formatter, Paredit.
Documentation
- Markdown All in One (yzhang.markdown-all-in-one) -> Markdown previews.
- markdownlint (davidanson.vscode-markdownlint) -> Markdown linting and style checking.
Items to configure.
Pre-Reqs:
- You have a ssh keypair (private/public key)
- The remote system has your public key in its ~/.ssh/authorized_keys
Create a ssh config file.
- Create a new plain text file. Example location:
- Linux: $HOME/.ssh/config
- Windows: $HOME\ssh\config
- Example contents:
Host devel-system
HostName system-name-here.example.com
User MYUSERNAME
IdentityFile "PATH-TO-SSH-DIR/ssh-rsa.key"
Connect to a remote system using the created ssh config:
- Open the command palette (ctrl+shift+p or View > Command Palette)
- Search "connect to host", enter or click on the appropriate ssh command (use current window or open new).
- Answer the questions to use your ssh config file or select a host if already configured for your ssh config file location.
- Once connected, open a folder on the remote system via normal vscode menus/shortcuts. (ctrl+k ctrl+o)
Learn some of the Calva shortcuts to help with repl connected editing: https://calva.io/commands-top10/
Start the Calva REPL (jack-in):
- Navigate to a clojure project directory
- Execute: "ctrl+alt+c" , release, then "ctrl+alt+j"