languages: Allow installing pre-release of rust-analyzer and clangd (#37530)

Release Notes:

- Added lsp binary config to allow fetching nightly rust-analyzer and
clangd releases
This commit is contained in:
Lukas Wirth
2025-09-04 09:22:19 +00:00
committed by GitHub
parent b7ad20773c
commit fca44f89c1
17 changed files with 87 additions and 11 deletions
+23 -5
View File
@@ -9,22 +9,23 @@ C++ support is available natively in Zed.
You can configure which `clangd` binary Zed should use.
To use a binary in a custom location, add the following to your `settings.json`:
By default, Zed will try to find a `clangd` in your `$PATH` and try to use that. If that binary successfully executes, it's used. Otherwise, Zed will fall back to installing its own `clangd` version and use that.
If you want to install a pre-release `clangd` version instead you can instruct Zed to do so by setting `pre_release` to `true` in your `settings.json`:
```json
{
"lsp": {
"clangd": {
"binary": {
"path": "/path/to/clangd",
"arguments": []
"fetch": {
"pre_release": true
}
}
}
}
```
If you want to disable Zed looking for a `clangd` binary, you can set `ignore_system_version` to `true`:
If you want to disable Zed looking for a `clangd` binary, you can set `ignore_system_version` to `true` in your `settings.json`:
```json
{
@@ -38,6 +39,23 @@ If you want to disable Zed looking for a `clangd` binary, you can set `ignore_sy
}
```
If you want to use a binary in a custom location, you can specify a `path` and optional `arguments`:
```json
{
"lsp": {
"cangd": {
"binary": {
"path": "/path/to/clangd",
"arguments": []
}
}
}
}
```
This `"path"` has to be an absolute path.
## Arguments
You can pass any number of arguments to clangd. To see a full set of available options, run `clangd --help` from the command line. For example with `--function-arg-placeholders=0` completions contain only parentheses for function calls, while the default (`--function-arg-placeholders=1`) completions also contain placeholders for method parameters.