10840: fix: Omit generic defaults for types in hover messages r=jonas-schievink a=Veykril
Fixes#9198
We have ranged hovers now which query specifically for the type of an expression/pattern, so if interested in seeing the default, the user can use that functionality instead.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10834: Make lint groups work correctly with `warningsAsInfo` and `warningsAsHint` r=Veykril a=Emilgardis
this change makes it possible to specify
```json
{
"rust-analyzer.diagnostics.warningsAsInfo": ["unused"],
}
```
to make all lints in the `unused` group show as info, etc.
Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
10809: fix: don't discard formatting of `use` lines r=Veykril a=iDawer
Use mutable syntax trees in `merge_imports`, `split_imports`. This tries to resolve#9013. But I haven't much managed to simplify code of merging.
Also resolve#9361. It reuses a use tree under the cursor so that comments+indentation are preserved. Merged trees are just appended to the end.
This touches bunch of tests. I removed the sorting of use trees as it needs a proper implementation that takes into account comments and line wrapping. I think it is rustfmt's job or at least until we get a close implementation.
Co-authored-by: iDawer <ilnur.iskhakov.oss@outlook.com>
10832: internal: Split parts of `ide_db::call_info` off into `ide` r=Veykril a=Veykril
`call_info` itself is just an ide feature and thus should not reside in `ide_db` itself.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10831: minor: Unnest `ide::display::navigation_target` module r=Veykril a=Veykril
This module contained multiple submodules before, but those were removed some time ago so there is no point in having this one module two layers deep anymore.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10810: feat: Add toggle to disable cache priming r=jonas-schievink a=lnicola
Even if it doesn't prevent the rest of the features from working, cache priming tends to be quite CPU-intensive and can make people think that the load times are worse than they actually are.
It's also less useful in Code and `rust-tools` because the inlay hints and semantic highlighting trigger quite a bit of computation assuming you have a file open in the editor.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
10821: fix: wrap `inline_call` and `inline_into_callers` if it inlines into the left side of a binary expression r=Veykril a=rainy-me
close#10359
Co-authored-by: rainy-me <github@yue.coffee>
10819: internal: Replace some `Vec` occurences with `Box` r=Veykril a=Veykril
Shaves off ~15mb from self analysis
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10808: fix: show custom check-command r=Veykril a=Florian-Schoenherr
just realized this is a lot cleaner and actually shows something on a custom command,
also debugged it this time.
Co-authored-by: Florian-Schoenherr <65456722+Florian-Schoenherr@users.noreply.github.com>