Add highlighting for go.work (#7142)
<img width="617" alt="image" src="https://github.com/zed-industries/zed/assets/45585937/ecb28152-db02-450e-bc81-395abd1c1eef"> Release Notes: - Added highlighting for go.work
This commit is contained in:
parent
ebdabb907a
commit
5d85801d1f
6 changed files with 34 additions and 0 deletions
|
@ -124,6 +124,7 @@ pub fn init(
|
|||
vec![Arc::new(go::GoLspAdapter)],
|
||||
);
|
||||
language("gomod", tree_sitter_gomod::language(), vec![]);
|
||||
language("gowork", tree_sitter_gowork::language(), vec![]);
|
||||
language(
|
||||
"zig",
|
||||
tree_sitter_zig::language(),
|
||||
|
|
7
crates/zed/src/languages/gowork/config.toml
Normal file
7
crates/zed/src/languages/gowork/config.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
name = "Go Work"
|
||||
path_suffixes = ["work"]
|
||||
line_comments = ["//"]
|
||||
autoclose_before = ")"
|
||||
brackets = [
|
||||
{ start = "(", end = ")", close = true, newline = true}
|
||||
]
|
14
crates/zed/src/languages/gowork/highlights.scm
Normal file
14
crates/zed/src/languages/gowork/highlights.scm
Normal file
|
@ -0,0 +1,14 @@
|
|||
[
|
||||
"replace"
|
||||
"go"
|
||||
"use"
|
||||
] @keyword
|
||||
|
||||
"=>" @operator
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
(version)
|
||||
(go_version)
|
||||
] @string
|
Loading…
Add table
Add a link
Reference in a new issue