An open API service indexing awesome lists of open source software.

https://github.com/deemp/eo-editor

EO code editor. Uses CodeMirror 6 and Lezer grammar
https://github.com/deemp/eo-editor

Last synced: 5 days ago
JSON representation

EO code editor. Uses CodeMirror 6 and Lezer grammar

Awesome Lists containing this project

README

          

# EO editor

* Created using [Lezer Grammar](https://lezer.codemirror.net/) and [Codemirror 6](https://codemirror.net/6/)
* EO [repo](https://github.com/cqfn/eo)

## Try online
* [Here](https://br4ch1st0chr0n3.github.io/eo-editor/)

## Features
* Syntax highlighting
* Show parsing errors (thanks to [this post](https://discuss.codemirror.net/t/showing-syntax-errors/3111/6))
* Show [Lezer](https://lezer.codemirror.net/) parse tree in browser console (thanks to [this post](https://discuss.codemirror.net/t/whats-the-best-to-test-and-debug-grammars/2542/5))
* Underline code (beta) with `Ctrl`+`H`(see [this example](https://codemirror.net/6/examples/decoration/))
* Actions from [basic-setup](https://codemirror.net/6/docs/ref/#basic-setup), including [keybindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
* Continued indentation (thanks to this [facet example](https://codemirror.net/6/examples/zebra/))
* Wait until `

` for the editor is created

## Use with your HTML
1. Create a tag with `id="eo-editor"`. The editor tab will be attached to it. You can change tag id in `./src/main.ts` where `view` is declared.
1. Add the script and styles from `./docs`, e.g.:
```html

```

## Development
* Install the dependencies and run in rebuild-on-change mode
```sh
npm i && npm run dev
```