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
- Host: GitHub
- URL: https://github.com/deemp/eo-editor
- Owner: deemp
- License: unlicense
- Created: 2021-12-23T17:23:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-17T19:57:45.000Z (almost 4 years ago)
- Last Synced: 2025-02-28T22:41:20.831Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://deemp.github.io/eo-editor/
- Size: 2.44 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```