Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

How to Contribute

Peter Strömberg edited this page Jun 24, 2018 · 7 revisions

Calva Formatter is made using TypeScript for the VS Code integration code and ClojureScript for whatever logic/work the extension needs to perform.

For this the shadow-cljs toolchain is used. Also CLJC is used for the ClojureScript code so that we can use the Clojure REPL and run the embedded tests and such. (The CLJS REPL is not always attached in VS Code projects for some reason.)

The process:

  1. Fork and clone your fork.
  2. Create a new branch for your changes. (See below for choosing where to branch off from.)
  3. npm install
  4. Open the project root directory in VS Code (code . if you have set up things like a boss)
  5. In VS Code: Tasks -> Run Build Task… -> Watch CLJC. Wait for it to compile the CLJC code and start watching.
  6. In VS Code: Tasks -> Run Build Task… -> Watch TS. Wait for it to compile the TypeScript code and start watching.
  7. Connect Calva: ctrl+alt+v c and select the :extensionbuild. (Switch off Calvas auto connect feature in Settings for this Workspace).
  8. Start the extension in debug mode (the Extension Host): F5.

As you change code, shadow-cljs will recompile the extension really fast, as will the TypeScript compiler, but you need to restart the Extension Host. (If you know how to get live reload to work, please let us know.)

When you have issued your Pull Request it is best to ping us about it to catch our attention. The #editors channel of the Clojurians Slack is a good place to ping us.

Clone this wiki locally