7819: Speedup heavy tests r=matklad a=matklad
bors r+
🤖
7820: Update vscode README with a small features list r=matklad a=Veykril
Nothing grande but I figured this is a bit better than showing almost nothing
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
4e5c496199
@ -39,6 +39,15 @@ pub struct Declaration {
|
||||
pub access: Option<ReferenceAccess>,
|
||||
}
|
||||
|
||||
// Feature: Find All References
|
||||
//
|
||||
// Shows all references of the item at the cursor location
|
||||
//
|
||||
// |===
|
||||
// | Editor | Shortcut
|
||||
//
|
||||
// | VS Code | kbd:[Shift+Alt+F12]
|
||||
// |===
|
||||
pub(crate) fn find_all_refs(
|
||||
sema: &Semantics<RootDatabase>,
|
||||
position: FilePosition,
|
||||
|
@ -59,6 +59,15 @@ pub(crate) fn prepare_rename(
|
||||
Ok(RangeInfo::new(range, ()))
|
||||
}
|
||||
|
||||
// Feature: Rename
|
||||
//
|
||||
// Renames the item below the cursor and all of its references
|
||||
//
|
||||
// |===
|
||||
// | Editor | Shortcut
|
||||
//
|
||||
// | VS Code | kbd:[F2]
|
||||
// |===
|
||||
pub(crate) fn rename(
|
||||
db: &RootDatabase,
|
||||
position: FilePosition,
|
||||
|
@ -54,6 +54,9 @@ fn completes_items_from_standard_library() {
|
||||
use std::collections::Spam;
|
||||
"#,
|
||||
)
|
||||
.with_config(serde_json::json!({
|
||||
"cargo": { "noSysroot": false }
|
||||
}))
|
||||
.server()
|
||||
.wait_until_workspace_is_loaded();
|
||||
|
||||
@ -450,6 +453,9 @@ fn main() {{}}
|
||||
"#,
|
||||
librs, libs
|
||||
))
|
||||
.with_config(serde_json::json!({
|
||||
"cargo": { "noSysroot": false }
|
||||
}))
|
||||
.server()
|
||||
.wait_until_workspace_is_loaded();
|
||||
|
||||
@ -572,7 +578,10 @@ fn main() {
|
||||
"###,
|
||||
)
|
||||
.with_config(serde_json::json!({
|
||||
"cargo": { "loadOutDirsFromCheck": true }
|
||||
"cargo": {
|
||||
"loadOutDirsFromCheck": true,
|
||||
"noSysroot": true,
|
||||
}
|
||||
}))
|
||||
.server()
|
||||
.wait_until_workspace_is_loaded();
|
||||
@ -715,7 +724,10 @@ pub fn foo(_input: TokenStream) -> TokenStream {
|
||||
"###,
|
||||
)
|
||||
.with_config(serde_json::json!({
|
||||
"cargo": { "loadOutDirsFromCheck": true },
|
||||
"cargo": {
|
||||
"loadOutDirsFromCheck": true,
|
||||
"noSysroot": true,
|
||||
},
|
||||
"procMacro": {
|
||||
"enable": true,
|
||||
"server": PathBuf::from(env!("CARGO_BIN_EXE_rust-analyzer")),
|
||||
|
@ -27,7 +27,15 @@ pub(crate) struct Project<'a> {
|
||||
|
||||
impl<'a> Project<'a> {
|
||||
pub(crate) fn with_fixture(fixture: &str) -> Project {
|
||||
Project { fixture, tmp_dir: None, roots: vec![], config: serde_json::Value::Null }
|
||||
Project {
|
||||
fixture,
|
||||
tmp_dir: None,
|
||||
roots: vec![],
|
||||
config: serde_json::json!({
|
||||
// Loading standard library is costly, let's ignore it by default
|
||||
"cargo": { "noSysroot": true }
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn tmp_dir(mut self, tmp_dir: TestDir) -> Project<'a> {
|
||||
|
@ -2,4 +2,32 @@
|
||||
|
||||
Provides support for rust-analyzer: novel LSP server for the Rust programming language.
|
||||
|
||||
|
||||
Features:
|
||||
|
||||
* [code completion], [imports insertion]
|
||||
* [go to definition], [implementation], [type definition]
|
||||
* [find all references], [workspace symbol search], [rename]
|
||||
* [types and documentation on hover]
|
||||
* [inlay hints]
|
||||
* [semantic syntax highlighting]
|
||||
* a lot of [assist(code actions)]
|
||||
* apply suggestions from errors
|
||||
* ... and many more, checkout the [manual] to see them all
|
||||
|
||||
[code completion]: https://rust-analyzer.github.io/manual.html#magic-completions
|
||||
[imports insertion]: https://rust-analyzer.github.io/manual.html#auto-import
|
||||
[go to definition]: https://rust-analyzer.github.io/manual.html#go-to-definition
|
||||
[implementation]: https://rust-analyzer.github.io/manual.html#go-to-implementation
|
||||
[type definition]: https://rust-analyzer.github.io/manual.html#go-to-type-definition
|
||||
[find all references]: https://rust-analyzer.github.io/manual.html#find-all-references
|
||||
[workspace symbol search]: https://rust-analyzer.github.io/manual.html#workspace-symbol
|
||||
[rename]: https://rust-analyzer.github.io/manual.html#rename
|
||||
[types and documentation on hover]: https://rust-analyzer.github.io/manual.html#hover
|
||||
[inlay hints]: https://rust-analyzer.github.io/manual.html#inlay-hints
|
||||
[semantic syntax highlighting]: https://rust-analyzer.github.io/manual.html#semantic-syntax-highlighting
|
||||
[assist(code actions)]: https://rust-analyzer.github.io/manual.html#assists-code-actions
|
||||
|
||||
[manual]: https://rust-analyzer.github.io/manual.html
|
||||
|
||||
See https://rust-analyzer.github.io/ for more information.
|
||||
|
Loading…
Reference in New Issue
Block a user