Clojure/Script mode for CodeMirror 6
Enabling a decent Clojure/Script editor experience in the browser. Built for and by Nextjournal.
โก๏ธ Lightning-fast thanks to lezer incremental parsing
clojure/core.clj
into the live demo.๐ฅค Slurping & ๐คฎ Barfing
๐ Semantic Selections
๐ง Prepared for evaluation
๐งน Autoformatting following Tonskyโs Better Clojure Formatting
๐น And lots of more useful key bindings
deps.edn
{:deps {io.github.nextjournal/clojure-mode {:git/sha "<SHA>"}}}
import { default_extensions, complete_keymap } from '@nextjournal/clojure-mode';
import { EditorView, drawSelection, keymap } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
let extensions = [keymap.of(complete_keymap),
...default_extensions
];
let state = EditorState.create({doc: "... some clojure code...",
extensions: extensions });
let editorElt = document.querySelector('#editor');
let editor = new EditorView({state: state,
parent: editorElt,
extensions: extensions });
yarn install
yarn watch
Licensed under the EPL License, Copyright ยฉ 2020-present Nextjournal GmbH.
See LICENSE for more information.