Lukas Wirth
47ad752e6c
Implement prev sibling determination for CompletionContext
2021-05-28 22:03:31 +02:00
Lukas Wirth
a6b92a8cc0
simplify
2021-05-28 20:46:09 +02:00
bors[bot]
d5f7b2e52a
Merge #9028
...
9028: only advertise range formatting support if enabled r=Veykril a=euclio
Fixes #9009 .
Co-authored-by: Andy Russell <arussell123@gmail.com >
2021-05-28 15:26:20 +00:00
bors[bot]
2968731fd5
Merge #9040
...
9040: Don't label derive macros with their banged_name r=Veykril a=Veykril
cc https://github.com/rust-analyzer/rust-analyzer/issues/7072#issuecomment-850396203
This doesn't fix it non builtin derives yet I think cause of a FIXME somewhere that doesn't categorize proc-macro derives as derives yet
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-28 12:59:54 +00:00
Lukas Wirth
439ae17e1b
Don't label derive macros with their banged_name
2021-05-28 14:59:24 +02:00
bors[bot]
b5d41ba0e2
Merge #9038
...
9038: Folding range for return types r=Veykril a=MozarellaMan
For issue #8957

Co-authored-by: Ayomide Bamidele <48062697+MozarellaMan@users.noreply.github.com >
2021-05-28 12:16:18 +00:00
Ayomide Bamidele
b4e936f8f0
Test for correct amount of emitted folds
2021-05-28 13:10:41 +01:00
Ayomide Bamidele
156d995423
Folding range for return types
2021-05-28 12:39:02 +01:00
Lukas Wirth
61b4456752
Move runnable lenses below attributes
2021-05-28 13:02:42 +02:00
Laurențiu Nicola
2dee5930e0
Remove undocumented TextDocumentSyncKind::Full support
2021-05-28 13:01:04 +03:00
bors[bot]
bca00ac340
Merge #9033
...
9033: Complete keywords in (Assoc)ItemList with leading attribute r=Veykril a=Veykril
Fixes #7673
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-28 01:21:45 +00:00
Lukas Wirth
1894db49b1
Complete keywords in (Assoc)ItemList with leading attribute
2021-05-28 03:20:55 +02:00
bors[bot]
3a1598c3bc
Merge #9032
...
9032: Only complete modules in empty use-statements r=Veykril a=Veykril
bors r+
Part of #8518
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-28 00:43:16 +00:00
Lukas Wirth
9e71dd9799
Only complete modules in empty use-statements
2021-05-28 02:42:47 +02:00
Lukas Wirth
411eee7614
Add another attribute completion test
2021-05-28 01:09:22 +02:00
Lukas Wirth
0724bd0f21
Add attribute completion tests
2021-05-28 01:02:41 +02:00
bors[bot]
5b4589f474
Merge #9029
...
9029: minor: test that `ItemTree` makes `hir_def` queries syntax-independent r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com >
2021-05-27 22:47:04 +00:00
Jonas Schievink
55f3ca2b74
Test that ItemTree works as intended
2021-05-28 00:46:05 +02:00
Lukas Wirth
594270be49
tt muncher time
2021-05-28 00:35:21 +02:00
Lukas Wirth
ab9c6ea4dd
Split attribute completion module into attribute, derive and lint modules
2021-05-27 23:40:33 +02:00
Andy Russell
a0cd7fe242
only advertise range formatting support if enabled
2021-05-27 17:36:13 -04:00
Lukas Wirth
fc37e2f953
Attribute completion is context aware
2021-05-27 23:28:14 +02:00
bors[bot]
01bfc5f5c0
Merge #9026
...
9026: Complete modules in assoc item lists r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-27 19:13:34 +00:00
Lukas Wirth
ea251cbd4a
Complete modules in item lists
2021-05-27 21:12:50 +02:00
Lukas Wirth
7ad378fec0
Complete modules in assoc item lists
2021-05-27 20:53:38 +02:00
Jonas Schievink
26b4777e1f
Move hir_ty incremental test to its own file
2021-05-27 20:21:52 +02:00
bors[bot]
a2940c42c0
Merge #9020
...
9020: fix: Don't complete non-macro item paths in impls and modules r=Veykril a=Veykril
Part of #8518
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-27 16:34:46 +00:00
Laurențiu Nicola
aabbc84957
Display unknown types in analysis-stats
2021-05-27 19:30:28 +03:00
Lukas Wirth
3a16950fd9
Cleanup ImmediateLocation determination
2021-05-27 18:16:39 +02:00
Laurențiu Nicola
2268a220e4
Don't store supertraits in ItemTree
2021-05-27 16:52:30 +03:00
Jonas Schievink
33debc4065
Update salsa
2021-05-27 15:05:41 +02:00
bors[bot]
d0a4ba294c
Merge #8997
...
8997: internal: stop expanding UseTrees during ItemTree lowering r=jonas-schievink a=jonas-schievink
Closes https://github.com/rust-analyzer/rust-analyzer/issues/8908
Messy diff, but `ItemTree` lowering got simpler, since we now have a strict 1-to-1 mapping between `ast::Item` and `ModItem`.
The most messy part is mapping a single `UseTree` back to its `ast::UseTree` counterpart for diagnostics, but I think the ad-hoc source map built during lowering does the job.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com >
2021-05-27 11:56:26 +00:00
Jonas Schievink
196cb65ead
Drop ignore from doctests
2021-05-27 13:55:31 +02:00
Lukas Wirth
f41c983424
Don't complete non-macro item paths in impls and modules
2021-05-27 12:23:36 +02:00
bors[bot]
7d1653dcdc
Merge #9005
...
9005: internal: Document semantic token tags r=matklad a=Veykril
Closes #6457
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-27 07:04:15 +00:00
Lukas Wirth
30948e1ecb
simplify
2021-05-27 03:47:20 +02:00
Lukas Wirth
6ec4ea8d9e
simplify
2021-05-27 03:15:48 +02:00
Lukas Wirth
7de925b8ab
Collapse more CompletionContext booleans into enums
2021-05-27 02:54:49 +02:00
bors[bot]
d6ed315806
Merge #9017
...
9017: internal: Reduce the number of traits passed through chalk during applicable trait lookup r=SomeoneToIgnore a=SomeoneToIgnore
Inherent traits can be omitted before trait solving, presumably slightly helping https://github.com/rust-analyzer/rust-analyzer/issues/7542 and slightly simplifying the code.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com >
2021-05-26 23:06:59 +00:00
Kirill Bulatov
050c592b8c
Exclude inherent traits more eagerly
2021-05-27 02:00:23 +03:00
Lukas Wirth
1f897f7319
Set record_pat_syntax more precisely in CompletionContext
2021-05-26 23:46:00 +02:00
bors[bot]
666fc1cec1
Merge #9015
...
9015: Merge pattern completion related bools into an enum r=Veykril a=Veykril
The two bools can never both be set so this is basically just a tri-state enum.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2021-05-26 20:43:53 +00:00
Lukas Wirth
7d865ef071
Merge pattern completion related bools into an enum
2021-05-26 22:39:47 +02:00
bors[bot]
8389510f8d
Merge #9012
...
9012: feat: add tab stops for keyword completions r=matklad a=eduardocanellas
Add tab stops for all the keywords that I judged fit. I also introduced some line breaks and spaces, following the pattern I saw in the `postfix` module.
Co-authored-by: Eduardo Canellas <eduardocanellas98@gmail.com >
2021-05-26 20:29:52 +00:00
Lukas Wirth
26e784a575
simplify
2021-05-26 21:09:27 +02:00
Eduardo Canellas
052df3deb7
feat: add tab stops for keyword completions
2021-05-26 14:24:54 -03:00
bors[bot]
bb1c7fc0cf
Merge #9008
...
9008: fix: remove undesired completions from trait/impl blocks r=Veykril a=eduardocanellas
Related to #8518
Co-authored-by: Eduardo Canellas <eduardocanellas98@gmail.com >
2021-05-26 17:04:09 +00:00
Eduardo Canellas
ce36746035
fix: remove undesired completions from trait/impl blocks
2021-05-26 13:21:27 -03:00
bors[bot]
f3aaae6555
Merge #9007
...
9007: Internal: `clippy::redundant_clone` fixes r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro >
2021-05-26 15:36:14 +00:00
Laurențiu Nicola
8206939fed
clippy::redundant_clone fixes
2021-05-26 18:34:50 +03:00