Skip to content

Commit 22e0ae5

Browse files
committed
First commit
0 parents  commit 22e0ae5

12 files changed

Lines changed: 2338 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Anton Medvedev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# codemirror-maml
2+
3+
[MAML](https://maml.dev) language support for [CodeMirror 6](https://codemirror.net/).
4+
5+
## Features
6+
7+
- Syntax highlighting
8+
- Code folding (objects, arrays, raw strings)
9+
- Auto-indentation
10+
- Bracket matching
11+
- Comment toggling (`#`)
12+
- Auto-close brackets
13+
14+
## Installation
15+
16+
```bash
17+
npm install codemirror-maml
18+
```
19+
20+
## Usage
21+
22+
```ts
23+
import {EditorView, basicSetup} from "codemirror"
24+
import {maml} from "codemirror-maml"
25+
26+
new EditorView({
27+
extensions: [basicSetup, maml()],
28+
parent: document.body,
29+
})
30+
```
31+
32+
## API
33+
34+
### `maml()`
35+
36+
Returns a `LanguageSupport` instance for MAML.
37+
38+
### `mamlLanguage`
39+
40+
The `LRLanguage` instance for advanced use cases (e.g., custom highlighting or nesting).
41+
42+
## License
43+
44+
[MIT](LICENSE)

0 commit comments

Comments
 (0)