Skip to content

Commit 487d739

Browse files
Working highlighting
1 parent 7e479ba commit 487d739

File tree

7 files changed

+40
-14
lines changed

7 files changed

+40
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/grammars

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Zed Crystal Support (WIP)
2+
3+
This is very much a work in progress as the tree-sitter is developed. Utilizes the tree-sitter found [here](https://github.com/crystal-lang-tools/tree-sitter).
4+
5+
Dev installation:
6+
- Clone the repository, rename the folder to `crystal`
7+
- In Zed, install a dev extension with Cmd+Shift+P > `install dev extension`

extension.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

extension.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
authors = ["Margret Riegert <[email protected]>"]
2+
description = "Syntax highlighting for Crystal"
3+
id = "crystal"
4+
name = "Crystal"
5+
repository = "https://github.com/nobodywasishere/zed-crystal"
6+
schema_version = 1
7+
version = "0.0.1"
8+
9+
[grammars.crystal]
10+
commit = "61cc201c8eb3b6fd4d4eb3e0ac6c303a580eeb6b"
11+
repository = "https://github.com/crystal-lang-tools/tree-sitter"

grammars/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

grammars/crystal.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

languages/crystal/config.toml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
name = "Crystal"
22
grammar = "crystal"
33
path_suffixes = ["cr"]
4-
line_comments = ["# "]
4+
line_comments = ["# "]
5+
autoclose_before = "}])"
6+
brackets = [
7+
{ start = "{", end = "}", close = true, newline = true },
8+
{ start = "[", end = "]", close = true, newline = true },
9+
{ start = "(", end = ")", close = true, newline = true },
10+
{ start = "\"", end = "\"", close = true, newline = false, not_in = [
11+
"comment",
12+
"string",
13+
] },
14+
{ start = "'", end = "'", close = true, newline = false, not_in = [
15+
"comment",
16+
"string",
17+
] },
18+
{ start = "`", end = "`", close = true, newline = false, not_in = [
19+
"comment",
20+
"string",
21+
] },
22+
]
23+
collapsed_placeholder = "# ..."
24+
tab_size = 2

0 commit comments

Comments
 (0)