bors[bot]
81d0096000
Merge #11035
...
11035: Include clippy lint groups in autocomplete r=Veykril a=k-nasa
## Why
close: https://github.com/rust-analyzer/rust-analyzer/issues/11027
## Proof
I confirmed that complement candidates are coming out.
https://user-images.githubusercontent.com/23740172/146465758-bc7d5cdd-e2fb-48d6-abf7-804ba859c9b1.mov
Co-authored-by: k-nasa <htilcs1115@gmail.com>
2021-12-18 17:59:29 +00:00
k-nasa
71ac246bd4
refactor: chain iter
2021-12-18 23:19:29 +09:00
bors[bot]
6674756c07
Merge #11041
...
11041: minor: Fix some clippy lints r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-17 15:52:53 +00:00
bors[bot]
04b0b19cdb
Merge #10527
...
10527: internal: Remove a few snippet completions, replace them with user snippets definitions in VSCode r=Veykril a=Veykril
Closes https://github.com/rust-analyzer/rust-analyzer/issues/9636
cc https://github.com/rust-analyzer/rust-analyzer/issues/7033#issuecomment-939959905
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-17 15:44:48 +00:00
Lukas Wirth
2a88b76041
Update tests
2021-12-17 16:39:21 +01:00
Laurențiu Nicola
fb9529626d
Spelling nits
2021-12-17 17:26:35 +02:00
Lukas Wirth
9fe0f0d1d9
Add a few default snippets for VSCode
2021-12-17 16:24:29 +01:00
Lukas Wirth
d3e538638a
fix: Don't duplicate attribute completions
2021-12-17 15:22:53 +01:00
k-nasa
7643e08962
Add clippy lint group to attribute auto compleme
2021-12-17 08:34:08 +09:00
bors[bot]
3f550d2e38
Merge #11000
...
11000: fix: insert whitespaces into assoc items for assist when macro generated r=Veykril a=Veykril
This is obviously only a temporary hack which still produces ugly looking items, but as long as the syntax is valid one can at least have rustfmt fix the formatting again.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6588
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-13 15:43:12 +00:00
Lukas Wirth
749eeef3e7
fix: insert whitespaces into assoc items for assist when macro generated
2021-12-13 16:35:32 +01:00
Lukas Wirth
328419534d
Move ws insert rendering for macro expansion into ide_db
2021-12-13 15:55:13 +01:00
bors[bot]
48cd733c9e
Merge #10956 #10986
...
10956: minor: Bump deps r=Veykril a=lnicola
bors r+
10986: fix: Fix lint completions not working for unclosed attributes r=Veykril a=Veykril
Fixes #10682
Uses keywords and nested `TokenTree`s as a heuristic to figure out when to stop parsing in case the attribute is unclosed which should work pretty well as attributes are usually followed by either of those.
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 14:58:07 +00:00
Lukas Wirth
0001a42570
fix: Fix lint completions not working for unclosed attributes
2021-12-11 15:55:25 +01:00
bors[bot]
d97f2f6b9b
Merge #10976
...
10976: fix: Show case-insensitive exact matches instead of fuzzy flyimport for short paths r=Veykril a=Veykril
And raise the fuzzy trigger from 2 to 3 chars. This way we keep the ability of flyimporting short names like `Rc`.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6917
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 13:50:55 +00: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
a7fc2061ea
Show enum completions for single variant enums in irrefutable patterns
2021-12-10 18:25:54 +01:00
Lukas Wirth
ae0c7268f7
internal: completion: split out more PathKinds from ImmediateLocation
2021-12-07 22:49:42 +01:00
Lukas Wirth
1f254dd855
feat: Enable flyimport completions for attributes
2021-12-05 15:57:28 +01:00
Lukas Wirth
e4f2d0e3a8
Introduce SymbolKind::Derive
2021-12-04 18:18:09 +01:00
Lukas Wirth
642c1eb720
Introduce SymbolKind::Attribute
2021-12-04 18:01:22 +01:00
bors[bot]
4ca6233bd2
Merge #10847
...
10847: fix: derive attr path handling in `replace_derive_with_manual_impl` r=rainy-me a=rainy-me
partially fixes #10666
renaming issues mentioned in https://github.com/rust-analyzer/rust-analyzer/issues/10666#issuecomment-955671021 doesn't seem to be fixable at this moment since it's not searchable?(not recorded?) by name.
<del>I'm not sure if it's appropriate to move `parse_comma_sep_paths` function to a method in `ast/node_ext`, maybe `ide_db::helpers` also make sense.</del> put into `ide_db::` instead.
Co-authored-by: rainy-me <github@yue.coffee>
2021-11-24 15:33:00 +00:00
rainy-me
0bb08ccb8f
fix: derive path handling
2021-11-25 00:21:29 +09:00
Lukas Wirth
0c98a01b3e
Remove possible multiline details in completions
2021-11-24 16:08:11 +01:00
Andrew Leverette
ce7a141110
Add support for qualified struct names
2021-11-23 10:57:29 -06:00
Lukas Wirth
f2f89618b7
minor: Simplify
2021-11-16 19:28:32 +01:00
zhoufan
5666046ec9
fix: flyimport triggers on enum variant declarations
2021-11-14 12:16:21 +08:00
Lukas Wirth
ab657af5b7
Add some completion profile spans
2021-11-08 19:41:16 +01:00
Lukas Wirth
2f5afba9f8
Replace some String usages with SmolStr in completions
2021-11-05 12:30:39 +01:00
Lukas Wirth
439a8194b0
Replace more Name::to_string usages with Name::to_smol_str
2021-11-04 18:12:05 +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
722489e3ff
Remove filtered completion list usage in completion tests
2021-10-27 16:53:39 +02:00
Lukas Wirth
a932935d4e
Fix postfix completions panicking
2021-10-25 15:22:29 +02:00
Laurențiu Nicola
ca44b6892e
Use array IntoIter
2021-10-22 09:23:29 +03:00
Lukas Wirth
bed6eae304
Fix qualified lint completions ignoring the qualifier value
2021-10-20 14:03:41 +02:00
bors[bot]
0e4c3b2c2b
Merge #10586
...
10586: internal: Derive completions work on hir, not names r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-19 11:51:07 +00:00
Lukas Wirth
3dfe5045c5
Derive completions work on hir, not names
2021-10-19 13:50:08 +02:00
Lukas Wirth
5704de66c2
Skip non clippy completions when completing a clippy path
2021-10-17 23:04:38 +02:00
Lukas Wirth
99906baa17
Fix clippy attribute completions always prefixing with clippy::
2021-10-17 13:07:49 +02:00
Lukas Wirth
ce47d13101
Make attribute completions more ast based
2021-10-17 12:44:44 +02:00
Lukas Wirth
81ccebf1f2
internal: Refactor lifetime completion context fields
2021-10-16 23:56:57 +02:00
Lukas Wirth
2fbd52c78f
fix: Fix qualified path completion not completing macros
2021-10-16 23:33:09 +02:00
Lukas Wirth
5ccaff3c97
Simplify
2021-10-11 21:49:50 +02:00
Lukas Wirth
12465a8a3c
Expose HasSource::source through Semantics with caching behaviour
2021-10-07 15:00:14 +02:00
Lukas Wirth
041cfbe0f4
Render the expansion of snippets as their docs
2021-10-05 18:11:22 +02:00
Lukas Wirth
77cbf4adbc
Bring the implementation closer to VSCode snippet definitions
2021-10-05 17:18:40 +02:00
Lukas Wirth
2b17da60db
Resolve macros in snippet require items
2021-10-04 22:53:02 +02:00
Lukas Wirth
454ecd167c
Make multiple import edits work for completions
2021-10-04 21:44:33 +02:00