mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
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
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -8828,6 +8828,15 @@ dependencies = [
|
||||
"tree-sitter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-gowork"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/d1y/tree-sitter-go-work#a2a4b99b53b3740855ff33f0b54cab0bb4ce6f45"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-haskell"
|
||||
version = "0.14.0"
|
||||
@ -10357,6 +10366,7 @@ dependencies = [
|
||||
"tree-sitter-glsl",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-gomod",
|
||||
"tree-sitter-gowork",
|
||||
"tree-sitter-haskell",
|
||||
"tree-sitter-heex",
|
||||
"tree-sitter-html",
|
||||
|
@ -145,6 +145,7 @@ tree-sitter-gleam = { git = "https://github.com/gleam-lang/tree-sitter-gleam", r
|
||||
tree-sitter-glsl = { git = "https://github.com/theHamsta/tree-sitter-glsl", rev = "2a56fb7bc8bb03a1892b4741279dd0a8758b7fb3" }
|
||||
tree-sitter-go = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "aeb2f33b366fd78d5789ff104956ce23508b85db" }
|
||||
tree-sitter-gomod = { git = "https://github.com/camdencheek/tree-sitter-go-mod" }
|
||||
tree-sitter-gowork = { git = "https://github.com/d1y/tree-sitter-go-work" }
|
||||
tree-sitter-haskell = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "cf98de23e4285b8e6bcb57b050ef2326e2cc284b" }
|
||||
tree-sitter-heex = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "2e1348c3cf2c9323e87c2744796cf3f3868aa82a" }
|
||||
tree-sitter-html = "0.19.0"
|
||||
|
@ -118,6 +118,7 @@ tree-sitter-gleam.workspace = true
|
||||
tree-sitter-glsl.workspace = true
|
||||
tree-sitter-go.workspace = true
|
||||
tree-sitter-gomod.workspace = true
|
||||
tree-sitter-gowork.workspace = true
|
||||
tree-sitter-haskell.workspace = true
|
||||
tree-sitter-heex.workspace = true
|
||||
tree-sitter-html.workspace = true
|
||||
|
@ -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…
Reference in New Issue
Block a user