7
fix: Retrigger visibility completion after parentheses by yue4u · Pull Request #...
source link: https://github.com/rust-lang/rust-analyzer/pull/12412
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
close #12390
This PR add (
to trigger_characters as discussed in original issue.
Some questions:
- Is lsp's
ctx.trigger_character
fromparams.context
is the same asctx.original_token
inside actually completions?- If not what's the difference?
- if they are the same, it's unnecessary to pass it down from handler at all.
- if they are the same, maybe we could parse it from fixture directly instead of using the
check_with_trigger_character
I added.
- Some completion fixtures written as
($0)
( https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/tests/fn_param.rs#L105 as an example), If I understand correctly they are not invoked outside tests at all?- using
ctx.original_token
directly would break these tests as well as parsing trigger_character from fixture for now. - I think it make sense to allow
(
triggering these cases?
- using
- I hope this line up with #12144
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK