-
Notifications
You must be signed in to change notification settings - Fork 8
How to Contribute
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:
- Fork and clone your fork.
- Create a new branch for your changes. (See below for choosing where to branch off from.)
npm install
- Open the project root directory in VS Code (
code .
if you have set up things like a boss) - In VS Code: Tasks -> Run Build Task… -> Watch CLJC. Wait for it to compile the CLJC code and start watching.
- In VS Code: Tasks -> Run Build Task… -> Watch TS. Wait for it to compile the TypeScript code and start watching.
- Connect Calva:
ctrl+alt+v c
and select the:extension
build. (Switch off Calvas auto connect feature in Settings for this Workspace). - 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.