Skip to content

Commit

Permalink
[zed] Add zed plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Nov 4, 2024
1 parent 7e923a7 commit 463b5f2
Show file tree
Hide file tree
Showing 17 changed files with 801 additions and 2 deletions.
189 changes: 189 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["crates/swc-plugin-gem"]
members = ["crates/*"]

resolver = "2"

Expand Down
1 change: 1 addition & 0 deletions crates/zed-plugin-gem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.wasm
10 changes: 10 additions & 0 deletions crates/zed-plugin-gem/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "gem"
version = "0.0.1"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
zed_extension_api = "0.1.0"
6 changes: 6 additions & 0 deletions crates/zed-plugin-gem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Gem for Zed

Improve the development experience of writing [Gem](https://github.com/mantou132/gem) elements.

- inline HTML/CSS/Style snippets
- highlight support // extend zed typescript
3 changes: 2 additions & 1 deletion crates/zed-plugin-gem/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
id = "gem"
name = "Gem"
description = "Gem plugin for VS Code"
version = "0.0.1"
schema_version = 1
authors = ["mantou132 <709922234@qq.com>"]
description = "Gem plugin for VS Code"
repository = "https://github.com/mantou132/gem"
snippets = "./snippets/typescript.json"
5 changes: 5 additions & 0 deletions crates/zed-plugin-gem/languages/typescript/brackets.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
("(" @open ")" @close)
("[" @open "]" @close)
("{" @open "}" @close)
("<" @open ">" @close)
("\"" @open "\"" @close)
19 changes: 19 additions & 0 deletions crates/zed-plugin-gem/languages/typescript/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = "TypeScript"
grammar = "typescript"
path_suffixes = ["ts", "cts", "d.cts", "d.mts", "mts"]
first_line_pattern = '^#!.*\b(?:deno run|ts-node|bun|tsx)\b'
line_comments = ["// "]
autoclose_before = ";:.,=}])>"
brackets = [
{ start = "{", end = "}", close = true, newline = true },
{ start = "[", end = "]", close = true, newline = true },
{ start = "(", end = ")", close = true, newline = true },
{ start = "<", end = ">", close = false, newline = true, not_in = ["string", "comment"] },
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
{ start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] },
{ start = "/*", end = " */", close = true, newline = false, not_in = ["string", "comment"] },
]
word_characters = ["#", "$"]
prettier_parser_name = "typescript"
tab_size = 2
Loading

0 comments on commit 463b5f2

Please sign in to comment.