on master help sign in
feat(lang): Cpon lang support (#2355)

Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>

commit166818359030cd1649327160c9020d943a8de244 authorFanda Vacek <fanda.vacek@gmail.com> dateSun 1 May 2022, 16:34 (4 years ago) parentede01b5
4 files changed+53
book/src/generated/lang-support.md+1 languages.toml+14 runtime/queries/cpon/highlights.scm+26 runtime/queries/cpon/indents.scm+12
book/src/generated/lang-support.md+1
@@ -6,6 +6,7 @@
66| cairo | ✓ | | | |
77| cmake | ✓ | ✓ | ✓ | `cmake-language-server` |
88| comment | ✓ | | | |
9+| cpon | ✓ | | ✓ | |
910| cpp | ✓ | ✓ | ✓ | `clangd` |
1011| css | ✓ | | | `vscode-css-language-server` |
1112| dart | ✓ | | ✓ | `dart` |
languages.toml+14
@@ -1289,3 +1289,17 @@ indent = { tab-width = 4, unit = " " }
12891289[[grammar]]
12901290name = "cairo"
12911291source = { git = "https://github.com/archseer/tree-sitter-cairo", rev = "5155c6eb40db6d437f4fa41b8bcd8890a1c91716" }
1292+
1293+[[language]]
1294+name = "cpon"
1295+scope = "scope.cpon"
1296+injection-regex = "^cpon$"
1297+file-types = ["cpon", "cp"]
1298+roots = []
1299+auto-format = true
1300+comment-token = "//"
1301+indent = { tab-width = 2, unit = " " }
1302+
1303+[[grammar]]
1304+name = "cpon"
1305+source = { git = "https://github.com/fvacek/tree-sitter-cpon", rev = "11ba46a4de3eb86934003133099c9963a60f9687" }
runtime/queries/cpon/highlights.scmnew file+26
@@ -0,0 +1,26 @@
1+[
2+ (true)
3+ (false)
4+] @constant.builtin.boolean
5+(null) @constant.builtin
6+(number) @constant.numeric
7+(pair
8+ key: (_) @keyword)
9+(ipair
10+ key: (_) @keyword)
11+(mpair
12+ key: (_) @keyword)
13+
14+(string) @string
15+(escape_sequence) @constant.character.escape
16+(ERROR) @error
17+
18+"," @punctuation.delimiter
19+[
20+ "["
21+ "]"
22+ "{"
23+ "}"
24+ "<"
25+ ">"
26+] @punctuation.bracket
runtime/queries/cpon/indents.scmnew file+12
@@ -0,0 +1,12 @@
1+[
2+ (meta)
3+ (map)
4+ (imap)
5+ (array)
6+] @indent
7+
8+[
9+ "]"
10+ "}"
11+ ">"
12+] @outdent