forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#127793 - ChaiTRex:zed_support, r=Kobzol
Added project-specific Zed IDE settings This repository currently has project-specific VS Code IDE settings in `.vscode` and `compiler/rustc_codegen_cranelift/.vscode`. Now there are equivalent project-specific Zed IDE settings alongside those. This fixes `rust-analyzer` not being able to properly handle this project. Note that: 1. The contents of `src/tools/rust-analyzer/.vscode` could not be translated to Zed, as they aren't basic IDE settings. 2. One of the VS Code settings in `.vscode` has no corresponding setting in Zed, and so this has been noted like this: ```json "_settings_only_in_vs_code_not_yet_in_zed": { "git.detectSubmodulesLimit": 20 }, ```
- Loading branch information
Showing
4 changed files
with
128 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"lsp": { | ||
"rust-analyzer": { | ||
"initialization_options": { | ||
"cargo": { | ||
"buildScripts": { | ||
"enable": true, | ||
"invocationLocation": "root", | ||
"invocationStrategy": "once", | ||
"overrideCommand": ["python3", "x.py", "check", "--json-output"] | ||
}, | ||
"extraEnv": { | ||
"RUSTC_BOOTSTRAP": "1" | ||
}, | ||
"sysrootSrc": "./library" | ||
}, | ||
"check": { | ||
"invocationLocation": "root", | ||
"invocationStrategy": "once", | ||
"overrideCommand": ["python3", "x.py", "check", "--json-output"] | ||
}, | ||
"linkedProjects": [ | ||
"Cargo.toml", | ||
"library/Cargo.toml", | ||
"src/tools/x/Cargo.toml", | ||
"src/bootstrap/Cargo.toml", | ||
"src/tools/rust-analyzer/Cargo.toml", | ||
"compiler/rustc_codegen_cranelift/Cargo.toml", | ||
"compiler/rustc_codegen_gcc/Cargo.toml" | ||
], | ||
"procMacro": { | ||
"enable": true, | ||
"server": "${workspaceFolder}/build/host/stage0/libexec/rust-analyzer-proc-macro-srv" | ||
}, | ||
"rustc": { | ||
"source": "./Cargo.toml" | ||
}, | ||
"rustfmt": { | ||
"overrideCommand": [ | ||
"${workspaceFolder}/build/host/rustfmt/bin/rustfmt", | ||
"--edition=2021" | ||
] | ||
}, | ||
"server": { | ||
"extraEnv": { | ||
"RUSTUP_TOOLCHAIN": "nightly" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |