Skip to content

Commit d5e3c75

Browse files
committed
update zed config file example
1 parent 0c95668 commit d5e3c75

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

docs/installation/ides.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,38 @@ Enable and configure basedpyright under Zed settings:
190190
{
191191
"languages": {
192192
"Python": {
193-
"language_servers": ["basedpyright"]
193+
"language_servers": [
194+
"basedpyright",
195+
// disable the other python language servers
196+
"!pyright",
197+
"!pylsp"
198+
]
194199
}
195200
}
196201
}
197202
```
203+
204+
??? tip "if adding basedpyright as a development dependency to your project"
205+
206+
we recommend using project settings (`.zed/settings.json`) with the following:
207+
208+
- set the path to the language server located inside your venv so that it uses the correct version of basedpyright instead of a globally installed version
209+
- add basedpyright to `auto_install_extensions` so that it's automatically installed for other contributors working on your project
210+
211+
```json title=".zed/settings.json"
212+
{
213+
"lsp": {
214+
"basedpyright": {
215+
"binary": {
216+
"path": ".venv/bin/basedpyright-langserver",
217+
"arguments": ["--stdio"]
218+
}
219+
}
220+
},
221+
"auto_install_extensions": {
222+
"basedpyright": true
223+
}
224+
}
225+
```
226+
227+
you should commit this file so that these settings are automatically applied for other contributors.

0 commit comments

Comments
 (0)