| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|/ |
|
|
|
| |
Co-authored-by: Aleksey Kladov <[email protected]>
|
| |
|
|
|
|
|
|
| |
optional
They use source() which now returns an Option so they need to too.
|
|
|
|
|
|
|
|
|
|
|
|
| |
special cased
In #6901 some special case handling for proc-macros was introduced to
prevent panicing as they have no AST. Now the new HasSource::source
method is used that returns an option.
Generally this was a pretty trivial change, the only thing of much
interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav`
as this allows us to handle `HasSource::source` now returning an option.
|
| |
|
|
|
|
| |
To start migrating HasSource::source to return an Option.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
7102: Fix completion of Default struct update syntax r=Veykril a=nick96
Previously the inserted text was always `..Default::default()` which ends up as `...Default::default()`
if `.` was typed. Now checks if the current token is `.` and inserts `.Default::default()`
if it is, so `..Default::default()` is correctly completed.
I think there's probably a better way to implement this context aware completion because I've seen it in other parts of rust-analyzer as a user but I'm not sure how to do it.
Fixes #6969
Co-authored-by: Nick Spain <[email protected]>
|
| |
| |
| |
| |
| | |
Per Veykril's suggestion, this removes the need to repeat the completion text twice. It also handles the completion
in a more general case.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the inserted text was always `..Default::default()` which ends up as `...Default::default()`
if `.` was typed. Now checks if the current token is `.` and inserts `.Default::default()`
if it is, so `..Default::default()` is correctly completed.
Fixes #6969
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
7064: Ignore qualifiers when doing autoimport completions lookup r=lnicola a=SomeoneToIgnore
A follow-up of https://github.com/rust-analyzer/rust-analyzer/pull/6918#issuecomment-748511151 and the PR itself.
Tweaks the `import_map` query api to be more flexible with the ways to match against the import path and now fuzzy imports search in names only.
This had improved the completion speed for me locally in ~5 times for `fuzzy_completion` span time, but please recheck me here.
IMO we're fast and presice enough now, so I've added the modules back to the fuzzy search output.
Also tweaks the the expect tests to display functions explicitly, to avoid confusing "duplicate" results.
Co-authored-by: Kirill Bulatov <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
7076: Properly parse path separators in format-like postfix r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <[email protected]>
|
| |/ |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
6960: Show enum variant on Self qualified paths r=matklad a=Veykril
Fixes first part of #6549
Fixes #6550
Co-authored-by: Lukas Wirth <[email protected]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
6901: Temp fixes panic caused by no ast for proc-macro r=maklad a=edwin0cheng
There are some panic when hover/goto definition for proc-macro. It is because in current design, we don't have `ast-node` for proc-macro and then it trigger [this](https://github.com/rust-analyzer/rust-analyzer/blob/479d1f7eec22c3564867223e2093f14774092528/crates/hir/src/has_source.rs#L116) line to panic.
This PR is a temp fix for all of these similar to https://github.com/rust-analyzer/rust-analyzer/blob/bd4c352831662762ee7a66da77ec9adf623b0a0a/crates/completion/src/render/macro_.rs#L42
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
derive(Clone, Copy) reads better than derive(Copy, Clone).
However, we preserve the reverse ordering in the lookup text for
sorting purposes. That way, it's convenient to type just `Ord` to
derive everything.
|
| |
|
|
|
|
| |
It's better to accept things as arguments rather than store them.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|