Commit graph

15651 commits

Author SHA1 Message Date
bors
3792720086 Auto merge of #12947 - Veykril:switch-workspace, r=Veykril
Don't switch workspace on vfs file changes from libraries

When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.
2022-08-05 13:13:44 +00:00
bors
97038e55cf Auto merge of #12949 - Veykril:token-pick, r=Veykril
fix: Fix incorrect token pick rankings
2022-08-05 13:06:10 +00:00
Lukas Wirth
6bf674c8e4 fix: Fix incorrect token pick rankings 2022-08-05 14:59:26 +02:00
Lukas Wirth
8aa50e08af Simplify 2022-08-05 14:54:14 +02:00
Lukas Wirth
352d3c6e50 Fix visibilities 2022-08-05 14:28:36 +02:00
Lukas Wirth
d6e78b04d0 feat: Handle operators like their trait functions in the IDE 2022-08-05 14:16:36 +02:00
Lukas Wirth
6a1737242b Don't switch workspace on vfs file changes from libraries
When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.
2022-08-05 12:06:42 +02:00
bors
0fe3bcfd35 Auto merge of #12808 - Veykril:check-workspace, r=Veykril
feat: Only flycheck workspace that belongs to saved file

Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038

There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
2022-08-04 12:57:04 +00:00
Lukas Wirth
df7f755e3b Don't flycheck while the workspace is being loaded 2022-08-04 14:56:44 +02:00
Jean santos
5698e51027 tidy formatting 2022-08-04 09:28:34 -03:00
Lukas Wirth
df9d3db82f Trigger flycheck on all transitive dependencies as well 2022-08-04 13:22:15 +02:00
Jean santos
49dac4070c on hover fallback error, adds ast::type as possible node 2022-08-03 17:37:11 -03:00
bors
2bc9a2d9e0 Auto merge of #12933 - Veykril:proc-ignored, r=Veykril
Use an empty expander for ignored non-attribute proc-macros

Identity is the wrong behaviour for anything that's not an attribute here
2022-08-03 16:11:08 +00:00
Lukas Wirth
a8a6c160be Use an empty expander for ignored non-attribute proc-macros 2022-08-03 18:10:15 +02:00
Dorian Scheidt
1980c1192c Support PathPat paths in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
111694d85b Be more strict about supported Paths in generate_enum_variant
PathType path parents don't support this assist
2022-08-02 14:37:12 -04:00
Dorian Scheidt
e4638def7a Support record fields in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
15d8049fa9 Support tuple fields in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
bea1fec7a2 convert generate_enum_variant to use add_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
405dd77d30 Support adding variants via structural editing 2022-08-02 14:37:12 -04:00
bors
113f1dbc91 Auto merge of #12880 - palango:while-fixup, r=Veykril
Add syntax fixup for while loops

Part of https://github.com/rust-lang/rust-analyzer/issues/12777

This is a first iteration to gather some feedback. In particular I'm not sure if the curly braces should be added here, but I couldn't get the test to work without them. Any hints welcome!
2022-08-02 14:08:56 +00:00
Jonas Schievink
bd7dfac5eb Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
Ryo Yoshida
d40ab66186
fix: remove whitespaces from doctest names 2022-08-01 17:57:47 +09:00
bors
af646621de Auto merge of #12916 - Veykril:nits, r=Veykril
minor: Properly cfg the `max` field of Limit
2022-07-31 17:42:10 +00:00
Lukas Wirth
3b2ecf44a0 Give variables more descriptive names 2022-07-31 19:27:34 +02:00
Lukas Wirth
d31f3605ce Properly cfg the max field of Limit 2022-07-31 19:27:20 +02:00
bors
e0ff4befda Auto merge of #12913 - Veykril:attr-merge, r=Veykril
fix: Fix ast-id up when merging raw attributes

Fixes https://github.com/rust-lang/rust-analyzer/issues/12912
2022-07-30 07:53:48 +00:00
Lukas Wirth
618cfd792c fix: Fix ast-id up when merging raw attributes 2022-07-30 09:43:30 +02:00
cynecx
902fd6ddcd fix: complete path of existing record expr 2022-07-29 17:24:05 +02:00
Laurențiu Nicola
11ef494b37 Be more explicit when filtering built-in completions 2022-07-28 21:45:47 +03:00
Laurențiu Nicola
948c9afc73 Only run rainbow highlighting test on 64-bit Unix 2022-07-28 21:03:59 +03:00
bors
b8763fe224 Auto merge of #12902 - Veykril:item-scope, r=Veykril
fix: Order ItemScope::entries results
2022-07-28 17:38:59 +00:00
Lukas Wirth
f867ddc621 fix: Order ItemScope::entries results 2022-07-28 19:28:56 +02:00
bors
32e640e2ba Auto merge of #12901 - Veykril:completion-trait-expr, r=Veykril
fix: Don't complete marker traits in expression position

cc https://github.com/rust-lang/rust-analyzer/issues/12196
2022-07-28 15:51:30 +00:00
Lukas Wirth
ce7541260d fix: Don't complete marker traits in expression position 2022-07-28 17:50:49 +02:00
bors
5986d2190f Auto merge of #12899 - Veykril:compl-qualifier, r=Veykril
fix: Do completions in path qualifier position

Fixes https://github.com/rust-lang/rust-analyzer/issues/12566

Not too happy with the duplication needed for this, but it is what it is. Completions in path qualifiers will have to be filtered properly still, but its better to show too many completions for this than too few for now.
2022-07-28 15:11:24 +00:00
Lukas Wirth
74abd44a26 fix: Do completions in path qualifier position 2022-07-28 17:09:31 +02:00
bors
02c240ff81 Auto merge of #12898 - Veykril:compl-pat-brace, r=Veykril
fix: Fix pattern completions adding unnecessary braces

Fixes https://github.com/rust-lang/rust-analyzer/issues/12852
2022-07-28 13:48:12 +00:00
Lukas Wirth
7c59d7c75c fix: Fix pattern completions adding unnecessary braces 2022-07-28 15:47:46 +02:00
bors
02f9ec4be5 Auto merge of #12895 - Veykril:compl-anchor, r=Veykril
fix: Calculate completions after type anchors

Fixes https://github.com/rust-lang/rust-analyzer/issues/12892
2022-07-28 08:06:58 +00:00
Lukas Wirth
e782e59d3d fix: Calculate completions after type anchors 2022-07-28 10:06:36 +02:00
bors
40875353a5 Auto merge of #12891 - brennanvincent:expander_stack, r=lnicola
Use large stack on expander thread

I have verified that this fixes #12884 for me.

Hat tip to `@bjorn3` for identifying the cause of the issue.
2022-07-27 19:40:59 +00:00
Brennan Vincent
f83738e1d9 Use large stack on expander thread 2022-07-27 15:02:34 -04:00
Paul Lange
c16e4f260f Add syntax fixup for loop 2022-07-27 18:18:51 +02:00
Paul Lange
a969481952 Add syntax fixup for while loops 2022-07-27 18:16:58 +02:00
Lukas Wirth
bf893d59b5 internal: Assume condition/iterable is missing if there is only a BlockExpr 2022-07-27 17:29:51 +02:00
bors
b4d652aa40 Auto merge of #12830 - hi-rustin:rustin-patch-issue-12717-fix, r=Veykril
Find original ast node before compute ref match

ref https://github.com/rust-lang/rust-analyzer/issues/12717
2022-07-27 12:31:26 +00:00
hi-rustin
349dfc7e95 Find original ast node before compute ref match in fn render
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-27 20:18:00 +08:00
Lukas Wirth
1f8daa180f fix: Honor ref expressions for compute_ref_match completions 2022-07-27 13:48:26 +02:00
Lukas Wirth
6c379b9f4b fix: Fix Semantics::original_ast_node not caching the resulting file 2022-07-27 12:46:04 +02:00