Lukas Wirth
661d721e20
Add completion module tailored towards use trees
2022-02-03 15:51:57 +01:00
Lukas Wirth
6940cca760
Move attribute path completions into attribute completion module
2022-02-03 15:50:14 +01:00
Lukas Wirth
82fccb971e
feat: Add very simplistic ident completion for format_args! macro input
2022-01-15 12:23:26 +01:00
Lukas Wirth
143a30aa51
Show case-insensitive exact matches instead of fuzzy flyimport for short paths
2021-12-11 14:47:11 +01:00
Lukas Wirth
96db0d8bdd
Add Semantics::original_ast_node for upmapping nodes out of macro files
2021-11-03 21:12:36 +01:00
Lukas Wirth
ebd63ec1cf
feat: Make unqualified derive attributes flyimportable
2021-10-29 14:51:26 +02:00
Lukas Wirth
0468b11de7
Remove CompletionKind
in favor of CompletionItemKind
2021-10-27 17:23:43 +02:00
Lukas Wirth
5ccaff3c97
Simplify
2021-10-11 21:49:50 +02:00
Lukas Wirth
77cbf4adbc
Bring the implementation closer to VSCode snippet definitions
2021-10-05 17:18:40 +02:00
Lukas Wirth
1f7e14e78b
Fix multiple imports acting on files on separately
2021-10-04 22:05:30 +02:00
Lukas Wirth
454ecd167c
Make multiple import edits work for completions
2021-10-04 21:44:33 +02:00
Lukas Wirth
046c85ef0c
Add custom non-postfix snippets
2021-10-04 19:22:41 +02:00
Lukas Wirth
88f213eadd
Initial implementation of custom postfix snippets
2021-10-04 17:49:21 +02:00
Alexandre Fourcat
9beefef8f9
Add completion for struct literal in which all fields are visible.
...
Fix ide_completion tests.
Move 'complete_record_literal' call to the main completion function.
Fix a rendering bug when snippet not available.
Checks if an expression is expected before adding completion for struct literal.
Move 'completion struct literal with private field' test to 'expressions.rs' test file.
Update 'expect' tests with new check in 'complete record literal'.
2021-08-04 18:52:58 +02:00
Robert Bartlensky
0b3d0cde8b
Add Limit
struct.
...
Fixes #9286 .
2021-07-19 13:26:11 +01:00
Lukas Wirth
9f9cc72ee5
Complete crate
, super
and self
in non-usetree paths
2021-07-07 19:08:37 +02:00
Aleksey Kladov
6e9780c005
internal: make CompletionItem and SourceChange consistent
...
Before this PR, SourceChange used a bool and CompletionItem used an enum
to signify if edit is a snippet. It makes sense to use the same pattern
in both cases. `bool` feels simpler, as there's only one consumer of
this API, and all producers are encapsulated anyway (we check the
capability at the production site).
2021-07-04 15:44:03 +03:00
Lukas Wirth
aa644b5585
Move test_utils into tests module
2021-06-16 21:51:52 +02:00
Lukas Wirth
d338a80394
Start refactoring ide_completion tests
2021-06-16 21:51:20 +02:00
Lukas Wirth
b29e8ed994
Remove unnecessary completion::macro_in_item_position
2021-06-07 19:46:25 +02:00
Lukas Wirth
343df88ac7
Generate default lint completions
2021-06-04 18:35:19 +02:00
Lukas Wirth
5d17b6a687
Implement hover for lints
2021-06-04 17:03:18 +02:00
Aleksey Kladov
45112aa8c0
internal: rename hypothetical -> speculative
...
Lets steal this good naming from Roslyn before I forget about it yet
again.
2021-05-24 22:21:25 +03:00
mixio
aa9002c68a
Corrected 2 typos on line 83
2021-05-10 20:05:32 +02:00
Lukas Wirth
b290cd5782
Add cov_marks to insert_use tests
2021-04-20 19:34:43 +02:00
Aleksey Kladov
1f00191de2
internal: document hypothetical completion problem
2021-04-05 16:27:45 +03:00
Ayomide Bamidele
276022682b
Gifs and screenshots for features in manual
2021-03-31 00:08:10 +01:00
Kirill Bulatov
eaa4fcbbde
Less reallocations
2021-03-21 11:45:37 +02:00
bors[bot]
09412d85fc
Merge #8123
...
8123: Do not display unqualified assoc item completions r=SomeoneToIgnore a=SomeoneToIgnore
Part of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/autoimport.20weirdness
Removes all flyimport completions for any unqualified associated type, effectively reverting https://github.com/rust-analyzer/rust-analyzer/pull/8095
I've explained the reasoning in the corresponding FIXME and open to discussions.
As an alternative way, we could add yet another parameter in the method that's used by the `qualify_path` and enable it for the qualify assists only.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2021-03-21 09:37:08 +00:00
Lukas Wirth
62a4677dbc
Add label completion
2021-03-21 01:02:22 +01:00
Lukas Wirth
3c000c6364
Add basic lifetime completion
2021-03-20 23:25:07 +01:00
Kirill Bulatov
879432452d
Docs
2021-03-20 22:55:34 +02:00
Kirill Bulatov
a631108d2d
Do not query item search by name eagerly
2021-03-20 22:33:54 +02:00
Lukas Wirth
ec824a92d0
Better handling of block doc comments
2021-03-17 14:48:57 +01:00
Josh Mcguigan
53bb46fa85
show function params in completion detail
2021-03-12 13:36:13 -08:00
Josh Mcguigan
9ee3914c61
remove unused CompletionScore enum
2021-03-12 06:16:04 -08:00
Josh Mcguigan
3679821eea
add completion relevance score
2021-03-12 06:16:01 -08:00
Aleksey Kladov
b2764a6641
Future proof completion scores
2021-03-09 20:24:09 +03:00
Kirill Bulatov
dccbb38d2e
Less lifetines: derive SemanticsScope in place
2021-03-08 23:59:20 +02:00
Kirill Bulatov
24a5d3b19d
Fix the completion labels and tests
2021-03-08 23:59:20 +02:00
Kirill Bulatov
33c83e72b9
Work towards better import labels
2021-03-08 23:59:20 +02:00
Kirill Bulatov
582cee2cdf
Return more data about located imports
2021-03-08 23:59:18 +02:00
asv
96fc01a30b
Make group imports configurable
2021-03-07 10:15:17 +02:00
Kirill Bulatov
4fe5786c0c
Consider import prefix config settings during flyimports
2021-02-20 13:53:50 +02:00
Aleksey Kladov
3db64a400c
rename completion -> ide_completion
...
We don't have completion-related PRs in flight, so lets do it
2021-02-17 17:53:31 +03:00