You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(zed): settings input and MCP servers example (#317)
This PR adds an optional `settings` input to the Zed module and updates
the README with an example for configuring MCP servers.
Changes:
- Add `settings` variable to modules/zed/main.tf
- Add `coder_script` to write/merge `~/.config/zed/settings.json`
(respects `$XDG_CONFIG_HOME` and merges with existing settings if `jq`
is available)
- Update README with a `settings` example configuring MCP context
servers and clarify default settings path
Test plan:
- Syntax-only: `bun test --filter zed` fails in CI without Terraform;
this change only adds inputs and a startup script. No behavior change to
existing outputs.
Co-authored-by: Atif Ali <[email protected]>
---------
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Co-authored-by: DevCats <[email protected]>
Copy file name to clipboardExpand all lines: registry/coder/modules/zed/README.md
+32-4Lines changed: 32 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Zed is a high-performance, multiplayer code editor from the creators of Atom and
19
19
module "zed" {
20
20
count = data.coder_workspace.me.start_count
21
21
source = "registry.coder.com/coder/zed/coder"
22
-
version = "1.0.1"
22
+
version = "1.1.0"
23
23
agent_id = coder_agent.example.id
24
24
}
25
25
```
@@ -32,7 +32,7 @@ module "zed" {
32
32
module "zed" {
33
33
count = data.coder_workspace.me.start_count
34
34
source = "registry.coder.com/coder/zed/coder"
35
-
version = "1.0.1"
35
+
version = "1.1.0"
36
36
agent_id = coder_agent.example.id
37
37
folder = "/home/coder/project"
38
38
}
@@ -44,7 +44,7 @@ module "zed" {
44
44
module "zed" {
45
45
count = data.coder_workspace.me.start_count
46
46
source = "registry.coder.com/coder/zed/coder"
47
-
version = "1.0.1"
47
+
version = "1.1.0"
48
48
agent_id = coder_agent.example.id
49
49
display_name = "Zed Editor"
50
50
order = 1
@@ -57,8 +57,36 @@ module "zed" {
57
57
module "zed" {
58
58
count = data.coder_workspace.me.start_count
59
59
source = "registry.coder.com/coder/zed/coder"
60
-
version = "1.0.1"
60
+
version = "1.1.0"
61
61
agent_id = coder_agent.example.id
62
62
agent_name = coder_agent.example.name
63
63
}
64
64
```
65
+
66
+
### Configure Zed settings including MCP servers
67
+
68
+
Zed stores settings at `~/.config/zed/settings.json` by default. If `XDG_CONFIG_HOME` is set on Linux, settings will be at `$XDG_CONFIG_HOME/zed/settings.json`.
69
+
70
+
You can declaratively set/merge settings with the `settings` input. Provide a JSON string (e.g., via `jsonencode(...)`). For example, to configure MCP servers:
71
+
72
+
```tf
73
+
module "zed" {
74
+
count = data.coder_workspace.me.start_count
75
+
source = "registry.coder.com/coder/zed/coder"
76
+
version = "1.1.0"
77
+
agent_id = coder_agent.example.id
78
+
79
+
settings = jsonencode({
80
+
context_servers = {
81
+
your-mcp-server = {
82
+
source = "custom"
83
+
command = "some-command"
84
+
args = ["arg-1", "arg-2"]
85
+
env = {}
86
+
}
87
+
}
88
+
})
89
+
}
90
+
```
91
+
92
+
See Zed’s settings files documentation: https://zed.dev/docs/configuring-zed#settings-files
0 commit comments