Commit Graph

1694 Commits

Author SHA1 Message Date
Lukas Wirth
7d51fc4640 Show proc-macro loading errors in unresolved-proc-macro diagnostics 2022-06-15 17:34:01 +02:00
bors
15c63c4119 Auto merge of #12541 - Veykril:vs-reload, r=Veykril
fix: Clear proc-macro changed flag when reloading workspace
2022-06-15 12:29:34 +00:00
Lukas Wirth
664a751f2b fix: Clear proc-macro changed flag when reloading workspace 2022-06-15 14:29:13 +02:00
Lukas Wirth
325ceaef19 fix: Check for the correct proc-macro settings in missing proc-macro diagnostics 2022-06-14 11:00:06 +02:00
bors
366bd7242e Auto merge of #12515 - Veykril:rustc-proc-macros, r=Veykril
fix: Pass the build data to rustc_private crates

With this all proc-macros should resolve in rustc now when setting up the build script running command properly.
2022-06-12 17:35:55 +00:00
Lukas Wirth
10e9f47dce fix: Pass the build data to rustc_private crates 2022-06-12 19:29:45 +02:00
Lukas Wirth
0e4eb647f6 More precise proc-macro errors 2022-06-12 18:44:46 +02:00
bors
604b1c8409 Auto merge of #12508 - Veykril:req-retry, r=Veykril
fix: Don't respond to cancelled requests when retrying them

Fixes https://github.com/rust-lang/rust-analyzer/issues/12482
2022-06-12 00:56:52 +00:00
Lukas Wirth
ad109f7f0a fix: Don't respond to cancelled requests when retrying them 2022-06-12 02:56:19 +02:00
Lukas Wirth
a7a1a83463
fix: Fix config patching for callable snippets 2022-06-11 13:41:06 +02:00
bors
ba329913fa Auto merge of #12449 - Veykril:version, r=Veykril
Bring the version command output in line with other rust tools

Inspired by how cargo handles it
Fixes https://github.com/rust-lang/rust-analyzer/issues/12280
![image](https://user-images.githubusercontent.com/3757771/171680176-236451ee-2c6c-449f-8aa5-4a047e8cc907.png)
2022-06-10 23:35:38 +00:00
bors
e9d3fe0484 Auto merge of #12502 - Veykril:deps, r=Veykril
internal: Bump Dependencies
2022-06-10 19:51:04 +00:00
Lukas Wirth
76ae5434fa internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
bjorn3
c81608c6d2 Fix a couple of weak warnings found by rust-analyzer itself 2022-06-08 14:35:11 +00:00
bors
6d3396a492 Auto merge of #12466 - lnicola:worker-thread-stack, r=lnicola
Increase worker thread stack and name them

CC #11370
2022-06-05 07:59:42 +00:00
Lukas Wirth
d38b7b88c6 minor: Don't log cancelled diagnostics 2022-06-05 01:38:46 +02:00
Laurențiu Nicola
0b9cd8a468 Increase worker thread stack and name them 2022-06-04 20:48:51 +03:00
Laurențiu Nicola
7066b8e0ca Shorten main thread name 2022-06-03 07:27:48 +03:00
Lukas Wirth
a2a3ea86ea Bring the version command output in line with other rust tools 2022-06-02 18:36:02 +02:00
bors
6f7c5589ab Auto merge of #12443 - Veykril:fmtfix, r=Veykril
minor: Fix rustfmt failing on main_loop.rs
2022-06-01 19:23:22 +00:00
Lukas Wirth
343562c54d minor: Fix rustfmt failing on main_loop.rs 2022-06-01 21:20:54 +02:00
Maan2003
bad931116e
fix(diagnostic): Don't remove diagnostic with empty message
Use " " as message if it is empty
2022-06-01 18:38:53 +05:30
Lukas Wirth
d88ae66ed9 Sync handlers cannot be cancelled 2022-06-01 12:18:15 +02:00
Lukas Wirth
e2da967578 fix: Fix completions disappearing when typing two keys in quick succession 2022-06-01 00:20:47 +02:00
Lukas Wirth
ea594c4c44 Use char for trigger character 2022-05-30 14:17:58 +02:00
bors
9ceaff91d3 Auto merge of #12406 - harpsword:fix-add-inlayHints-closures-without-block, r=Veykril
fix: add an option to show inlay hint for return type of closures wit…

fix #12321
2022-05-30 11:36:55 +00:00
yue4u
1b5f0462ed fix: visibility completion 2022-05-30 00:06:48 +09:00
harpsword
55509548e8 fix: add an option to show inlay hint for return type of closures without block 2022-05-28 22:12:30 +08:00
bors
145bad473d Auto merge of #12341 - vemoo:exclude_dirs, r=Veykril
make `files.excludeDirs` work

There's a small issue because if all projects are excluded, this: 01d412f4d7/crates/rust-analyzer/src/main_loop.rs (L114) will be shown.
I thought about not showing it if `files.excludeDirs` is set, but that is not necessarily correct.

Fixes #7755
2022-05-27 12:35:48 +00:00
Lukas Wirth
5410ace1fe fix: Clear native diagnostics for files when they are deleted 2022-05-25 15:47:41 +02:00
Lukas Wirth
f02c915eb5 internal: Make autoclosing angle brackets configurable, disabled by default 2022-05-25 12:42:07 +02:00
DQ
f3a5475082
Keep the other is in reload.rs docs 2022-05-23 10:29:03 +02:00
DQ
914ff6a395
Fix typo in new reload.rs docs
Just skimmed today's changelog and came across the repetition
2022-05-23 09:35:32 +02:00
Felicián Németh
3bb02f2329 feat: Add on-typing handler for left angle
Only advertise this feature in the server capabilities when the client
supports SnippetTextEdit.

Close #11398.

Co-authored-by: unexge <unexge@gmail.com>
2022-05-22 10:40:37 +02:00
Felicián Németh
636d4880c4 internal: Allow OnTypeFormatting to send SnippetTextEdit
But continue to send TextEdit only.
2022-05-22 10:39:18 +02:00
Bernardo Uriarte
1ee8fefcff take into account excludeDirs when computing linked_projects 2022-05-21 16:18:55 +02:00
Bernardo Uriarte
7009e5ab35 add failing test 2022-05-21 16:11:51 +02:00
Aleksey Kladov
cbdab0e647 internal: document overall approach to reload 2022-05-21 13:11:05 +01:00
Jonas Schievink
3e356c1fd3 Clear cargo check diagnostics when flycheck is turned off 2022-05-20 15:07:55 +02:00
bors
41388bf81a Auto merge of #12263 - andylizi:hide-type-hint-closure, r=Veykril
feat: hide type inlay hints for initializations of closures

![hide_closure_initialization](https://user-images.githubusercontent.com/12008103/168470158-6cb77b18-068e-4431-a8b5-e2b22d50d263.gif)

This PR adds an option to hide the inlay hints for `let IDENT_PAT = CLOSURE_EXPR;`, which is a somewhat common coding pattern. Currently the inlay hints for the assigned variable and the closure expression itself are both displayed, making it rather repetitive.

In order to be consistent with closure return type hints, only closures with block bodies will be hid by this option.

Personally I'd feel comfortable making it always enabled (or at least when closure return type hints are enabled), but considering the precedent set in #10761, I introduced an off-by-default option for this.

changelog feature: option to hide type inlay hints for initializations of closures
2022-05-20 12:35:36 +00:00
bors
f5229cebb2 Auto merge of #12301 - harpsword:fix_for_crlf_cargo_range_map, r=jonas-schievink
fix: calculate correct postion for Dos line ending in mapping rustc range to ls…

fix #12293
2022-05-20 12:15:22 +00:00
andylizi
2b1c1a934c
feat: hide type inlay hints for initializations of closures 2022-05-20 17:42:56 +08:00
bors
eba26af9f1 Auto merge of #12314 - jonas-schievink:proc-macro-load, r=jonas-schievink
minor: simplify
2022-05-19 14:50:08 +00:00
bors
46b5483055 Auto merge of #12313 - equinox:typo-fix, r=lnicola
Removed duplicate 'to' in `cachePriming.numThreads` option description

One 'to' too many!
2022-05-19 14:22:09 +00:00
Equinox
7197042ac4 remove duplicate 'to' in cachePriming.numThreads option description 2022-05-20 02:05:48 +12:00
Jonas Schievink
b2779111b4 simplify 2022-05-19 15:29:35 +02:00
Lukas Wirth
b08bbd7be0 Enable hovering function parameter inlay hints 2022-05-19 14:32:40 +02:00
Lukas Wirth
74230e26ff internal: Improve inlay hint tooltips 2022-05-19 13:38:37 +02:00
Jonas Schievink
93b62dbe85 Improve docs generation assist 2022-05-18 18:05:21 +02:00
harpsword
dfae0a12ef fix: calculate right range for Dos line ending in mapping rustc range to lsp range 2022-05-18 21:08:18 +08:00