Intuitive S-expressions editing for Calcit.
- Auto Layout: expressions in blocks and inline-blocks, styled with CSS
- Structural Editing: intuitive way of structural editing as nested expressions
- Call Stack Navigation: more fine-grained functions navigation
- Collaboration: changes real-time synced among multiple clients via WebSockets
One function/definition in a screen, Command d to open called function at next tab, Command j Command k Command i to switch. Screenshots from Chrome App:
Based on DOM/CSS, easy for another theme:
Command p to search and jump inspired by Sublime Text :
Browse definitions in a dependency tree:
Install CLI and start a local WebSocket server, it uses calcit.cirru as a snapshot file:
npm i -g @calcit/editor
ctUI of the editor is a webapp on http://editor.calcit-lang.org/?port=6001
You may try with my project templates:
- simple virtual DOM playground calcit-workflow
- a toy Node.js script calcit-nodejs-workflow
To build this checkout, pair Calcit CLI and @calcit/procs at 0.44.0, reinstall dependencies, and rebuild both the server and the page. The module graph uses gen-code 0.0.29, WS-EDN 0.2.11 and JS-FFI 0.2.23, and the matching released Respo and Recollect versions. Existing project files and bookmark wire data keep their formats; stop the local server before updating, restart it after rebuilding, and reload each open editor page.
If the Snapshot changed while an editor archive has pending changes, non-overlapping changes are reconciled automatically. Overlapping changes open a recovery view with saving disabled: copy the pending edits elsewhere before closing, because changes made in that view are not saved. The original archive and current Snapshot remain untouched. Archives without a complete baseline or with a different package are not recovered automatically.
Don't forget to check out keyboard shortcuts. My old introduction videos can be found on YouTube.
CLI variables for compiling code directly from calcit.cirru:
op=compile ctThe web UI takes several query options:
http://editor.calcit-lang.org/?host=localhost&port=6001
port, defaults to6001host, defaults tolocalhost, connects via WebSocket
Code is emitted in calcit.cirru by pressing Command s. One extra file will be emitted:
.compact-inc.cirrucontains diff information from latest modification of per definition.
It would be used in calcit-runner.
When server is stopped with Control c, calcit.cirru is also updated.
There are also several options in :configs field in calcit.cirru:
port, defaults to6001
Editor UI is decoupled with WebSocket server, so it's okay to connect remote server from multiple pages with all expressions synced in real-time.
Previously it's https://github.com/Cirru/calcit-editor which is for ClojureScript. And this repo is for Calcit-js only.
MIT