Home

Awesome

Clojure/Script mode for CodeMirror 6

Enabling a decent Clojure/Script editor experience in the browser. Built for and by Nextjournal.

โœจ Features

โšก๏ธ Lightning-fast thanks to lezer incremental parsing

๐Ÿฅค Slurping & ๐Ÿคฎ Barfing

๐Ÿ’— Semantic Selections

๐Ÿง™ Prepared for evaluation

๐Ÿงน Autoformatting following Tonskyโ€™s Better Clojure Formatting

๐ŸŽน And lots of more useful key bindings

๐Ÿ“ฆ Use it in your project

Include it in your deps.edn

{:deps {io.github.nextjournal/clojure-mode {:git/sha "<SHA>"}}}

Use it from NPM

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 });

๐Ÿ›  Development Setup

โš–๏ธ License

Licensed under the EPL License, Copyright ยฉ 2020-present Nextjournal GmbH.

See LICENSE for more information.