Lukas Wirth
673e2b1d8f
feat: Implement lifetime elision hints
2022-03-18 18:11:16 +01:00
Laurențiu Nicola
86b1ef9ab2
Bump deps
2022-03-17 19:24:37 +02:00
bors[bot]
3bff42fd14
Merge #11734
...
11734: internal: Bump `xshell` and fix `dist` r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro >
2022-03-17 06:54:27 +00:00
Laurențiu Nicola
be6d5001e4
Bump xshell and fix dist
2022-03-17 08:53:33 +02:00
Lukas Wirth
bd17933c31
feat: Add return type hints for closures with block bodies
2022-03-16 21:25:03 +01:00
Laurențiu Nicola
620411df80
Mark chaining hints as types, since that's what they are
2022-03-16 07:46:09 +02:00
Aleksey Kladov
56e43c34e7
⬆️ xshell
2022-03-14 14:57:24 +00:00
Matthias Krüger
56e4ea59d9
more clippy fixes:
...
clippy::match_like_matches_macro
clippy::to_string_in_format_args
clippy::single_char_add_str
clippy::filter_map_identity
clippy::clone_on_copy
clippy::useless_format
clippy::unused_unit
2022-03-12 16:50:49 +01:00
Matthias Krüger
77790f2b8e
fix clippy::needless_return
2022-03-12 16:50:49 +01:00
Matthias Krüger
d64d711db2
fix clippy::map_flatten
2022-03-12 16:50:49 +01:00
Matthias Krüger
1f70886b15
fix clippy::single_char_pattern
2022-03-12 16:50:49 +01:00
Matthias Krüger
7912e33ed6
fix clippy::needless_borrow
2022-03-12 16:50:49 +01:00
Lukas Wirth
21af9ba4f0
minor: Pad type inlay hints if no colons are requested
2022-03-12 14:08:39 +01:00
Lukas Wirth
119ba82e4b
minor: add missing definitions of lsp_ext::InlayHintLabel
2022-03-12 01:08:33 +01:00
Lukas Wirth
62265ee9cb
fix: Allow configuration of colons in inlay-hints
2022-03-11 21:15:36 +01:00
Lukas Wirth
a9dd606387
fix: Show what file paths were expected for unresolved modules
2022-03-11 17:08:30 +01:00
Laurențiu Nicola
4a6ee4517a
Add back colons around inlay hints
2022-03-08 12:01:02 +02:00
Laurențiu Nicola
8e3057d0a7
Improve inlay hint padding
2022-03-07 19:18:36 +02:00
bors[bot]
49646b71d4
Merge #11445
...
11445: Upstream inlay hints r=lnicola a=lnicola
Closes https://github.com/rust-analyzer/rust-analyzer/issues/2797
Closes https://github.com/rust-analyzer/rust-analyzer/issues/3394 (since now resolve the hints for the range given only, not for the whole document. We don't actually resolve anything due to [hard requirement](https://github.com/rust-analyzer/rust-analyzer/pull/11445#issuecomment-1035227434 ) on label being immutable. Any further heavy actions could go to the `resolve` method that's now available via the official Code API for hints)
Based on `@SomeoneToIgnore's` branch, with a couple of updates:
- I squashed, more or less successfully, the commits on that branch
- downloading the `.d.ts` no longer works, but you can get it manually from https://raw.githubusercontent.com/microsoft/vscode/release/1.64/src/vscode-dts/vscode.proposed.inlayHints.d.ts
- you might need to pass `--enable-proposed-api matklad.rust-analyzer`
- if I'm reading the definition right, `InlayHintKind` needs to be serialized as a number, not string
- this doesn't work anyway -- the client-side gets the hints, but they don't display
Co-authored-by: Kirill Bulatov <mail4score@gmail.com >
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro >
2022-03-07 16:49:12 +00:00
Laurențiu Nicola
88a2141b77
Add inlayHints cap
2022-03-07 18:48:27 +02:00
Laurențiu Nicola
26d2e88b04
Fix parameter hint position
2022-03-07 15:24:54 +02:00
Laurențiu Nicola
b9d74fe2ed
Update LSP docs
2022-03-07 15:09:31 +02:00
Lukas Wirth
93b09ca067
Update tidy ignore list
2022-03-06 19:18:40 +01:00
Lukas Wirth
ab21cf2f4f
internal: Re-arrange ide_db modules
2022-03-06 19:04:04 +01:00
Lukas Wirth
5c0aee013e
Fix highlighting of Self
2022-03-05 23:34:37 +01:00
Laurențiu Nicola
4b16b9b74b
Fix formatting
2022-03-04 08:15:17 +02:00
Kirill Bulatov
5de5e450cb
Remove debugging leftovers
2022-03-04 08:08:59 +02:00
Kirill Bulatov
b1d8dae930
Load hints for part of the file only
2022-03-04 07:45:51 +02:00
Kirill Bulatov
9c0c199e96
Clean up the redundant hints code and config
2022-03-04 07:45:51 +02:00
Laurențiu Nicola
0b69717ab6
Fixes
2022-03-04 07:45:51 +02:00
Laurențiu Nicola
5a49dbd2e0
Update inlay hints for upstream
2022-03-04 07:45:51 +02:00
Kirill Bulatov
55371be807
Add experimental VSCode api
2022-03-04 07:45:51 +02:00
bors[bot]
a2cc1d6b7b
Merge #11538
...
11538: feat: Make private editable completions configurable, disable by default r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10253
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9885
This does disable these completions by default, as it seems that people find this behaviour surprising(due to other IDEs usually not doing this).
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2022-02-25 21:17:24 +00:00
Lukas Wirth
2a7793d912
feat: Make private editable completions configurable, disable by default
2022-02-25 22:16:40 +01:00
Florian Diebold
f807ccd6c0
Add CSV output to analysis-stats
...
For easy diffing.
2022-02-25 11:45:44 +01:00
bors[bot]
979b5b32bc
Merge #11455
...
11455: Handle proc-macro functions as the proc-macro they resolve to r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11212
Co-authored-by: Lukas Wirth <lukastw97@gmail.com >
2022-02-21 16:56:37 +00:00
bors[bot]
b0e293bf69
Merge #11424
...
11424: Pass required features to cargo when using run action r=Veykril a=WaffleLapkin
When using `F1`->`Rust Analyzer: Run` action on an `example`, pass its `required-features` to `cargo run`. This allows to run examples that were otherwise impossible to run with RA.
Co-authored-by: Maybe Waffle <waffle.lapkin@gmail.com >
2022-02-21 10:21:39 +00:00
Felicián Németh
2bcde5953a
Fix a typo in server_capabilities.experimental
2022-02-19 10:58:10 +01:00
doki
94b6038657
correct the description of Struct GlobalState
2022-02-14 19:30:21 +08:00
Felicián Németh
27c4be6b4f
fix: add missing experimental capabilities
...
Fix #11389 by extending server_capabilities.experimental with
matchingBrace, externalDocs, moveItems. Also, sort entries
alphabetically.
2022-02-12 15:37:13 +01:00
Lukas Wirth
cef8a17ea5
Handle proc-macro functions as the proc-macro they resolve to
2022-02-11 22:06:03 +01:00
Laurențiu Nicola
50a1319f46
Bump lsp-types
2022-02-09 09:22:25 +02:00
Laurențiu Nicola
c8f056a6db
Revert "Revert "Bump dashmap""
...
This reverts commit 39674cd350 .
2022-02-09 09:19:57 +02:00
Moritz Vetter
482533ea9a
add missing snake case attribute, update hash
2022-02-07 04:57:20 +01:00
Maybe Waffle
662dd7c27d
Pass required features to cargo when using run action
...
When using `F1`->`Rust Analyzer: Run` action on an `example`, pass its
`required-features` to `cargo run`. This allows to run examples that
were otherwise impossible to run with RA.
2022-02-06 19:02:25 +03:00
bors[bot]
0808ade4e4
Merge #11182
...
11182: fix: don't panic on seeing an unexpected offset r=Veykril a=dimbleby
Intended as a fix, or at least a sticking plaster, for #11081 .
I have arranged that [offset()](1ba9a924d7/crates/ide_db/src/line_index.rs (L105-L107) ) returns `Option<TextSize>` instead of going out of bounds; other changes are the result of following the compiler after doing this.
Perhaps there's still an issue here - I suppose the server and client have gotten out of sync and that probably shouldn't happen in the first place? I see that https://github.com/rust-analyzer/rust-analyzer/issues/10138#issuecomment-913727554 suggests what sounds like a more substantial fix which I think might be aimed in this direction. So perhaps that one should be left open to cover such things?
Meanwhile, I hope that not-crashing is a good improvement: and I can confirm that it works out just fine in the repro I have at #11081 .
Co-authored-by: David Hotham <david.hotham@metaswitch.com >
2022-01-31 11:16:22 +00:00
Jonas Schievink
3c51aaf065
Fix merge commit check for git 2.35
2022-01-26 19:10:39 +01:00
bors[bot]
2cb85c14b6
Merge #11281
...
11281: ide: parallel prime caches r=jonas-schievink a=jhgg
cache priming goes brrrr... the successor to #10149
---
this PR implements a parallel cache priming strategy that uses a topological work queue to feed a pool of worker threads the crates to index in parallel.
## todo
- [x] should we keep the old prime caches?
- [x] we should use num_cpus to detect how many cpus to use to prime caches. should we also expose a config for # of worker CPU threads to use?
- [x] something is wonky with cancellation, need to figure it out before this can merge.
Co-authored-by: Jake Heinz <jh@discordapp.com >
2022-01-25 16:03:35 +00:00
bors[bot]
e6e72809e3
Merge #11287
...
11287: fix: rust-analyzer spamming overly error message when workspace not being loaded r=lnicola a=Milo123459
Fixes #10120
Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com >
2022-01-16 15:13:52 +00:00
Jake Heinz
25f67b6939
make it a config
2022-01-15 02:47:47 +00:00