21902 Commits

Author SHA1 Message Date
Lukas Wirth
7202146f65 Rank ADT constructors as constructors for completion scoring 2025-03-09 15:36:53 +01:00
Shoyu Vanilla
5b202cb663 fix: Prevent wrong invocations of needs_parens_in with non-ancestral "parent"s 2025-03-09 18:54:22 +09:00
Shoyu Vanilla
c6ea7cbafa internal: Migrate inline_local_variable to SyntaxEditor 2025-03-09 15:51:37 +09:00
Lukas Wirth
62dea277cc
Merge pull request #19308 from Veykril/push-rnrxutwlvmly
Move loaded project MSRV back to 1.78, show notification for the warning
2025-03-07 07:06:54 +00:00
Lukas Wirth
1427a91c62 Pop up a notification for the MSRV project loading warning 2025-03-07 07:51:53 +01:00
Lukas Wirth
0424e2e2bf Move project MSRV back to 1.78 2025-03-07 07:51:53 +01:00
Tongjun Gao
7d68c28873 Refactor relevance scoring to use a named constant BASE_SCORE
Replace magic number with a named constant for improved readability and maintainability of the scoring logic
2025-03-07 14:44:57 +08:00
Tongjun Gao
88e18230ba Fix logical error in relevance scoring implementation 2025-03-07 14:21:57 +08:00
Lukas Wirth
bd0289e0e9
Merge pull request #19290 from aibaars/patch-1
Add warning and debug information when `cargo metadata` fails
2025-03-06 13:21:24 +00:00
Arthur Baars
e98c98fa31 Change %e to ?e to include detailed error message 2025-03-06 12:42:35 +00:00
Tongjun Gao
98b1d5e8a3 Adjust relevance scoring threshold to consistent with existing implementations 2025-03-06 10:14:39 +08:00
Lukas Wirth
d426cbee76
Merge pull request #19292 from Veykril/push-zonnrrlosqmv
Fix syntax highlightingg punct filtering ignoring mods
2025-03-05 14:18:09 +00:00
Lukas Wirth
4552a3421f
Merge pull request #19279 from Natural-selection1/master
Improve keyword completion for 'let' and 'let mut'
2025-03-05 14:14:41 +00:00
Lukas Wirth
94915fbe48 Fix syntax highlightingg punct filtering ignoring mods 2025-03-05 15:02:44 +01:00
Lukas Wirth
27dc614627
Merge pull request #19274 from Veykril/push-pouwrwwrlrlt
Highlight unsafe operations as unsafe, not definitions
2025-03-05 12:57:25 +00:00
Lukas Wirth
9fc0ffe008 Use HIR unsafety information for unsafe syntax highlightng 2025-03-05 13:18:46 +01:00
Arthur Baars
c053cc72a7
Improve tracing log format in cargo_workspace.rs 2025-03-05 12:49:42 +01:00
Arthur Baars
55d61be9a3
Add warning and debug information when cargo metadata fails
The errors are silently dropped elsewhere, which make it really hard to debug issues due to dependency download failures.
2025-03-05 10:40:11 +01:00
Tongjun Gao
3ef8a371e8 add test cases for 'letm' keyword completion 2025-03-05 17:26:30 +08:00
Thalia Archibald
0811ca0a61 Use size_of from the prelude instead of imported
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.

These functions were added to all preludes in Rust 1.80.
2025-03-05 00:48:44 -08:00
Thalia Archibald
0aa623e108 minicore: Add size_of to prelude and add rust_2024 prelude 2025-03-05 00:30:38 -08:00
Laurențiu Nicola
3c394c61b8
Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn-diagnostic
feat: Add diagnostic for dangling dyn and impl
2025-03-05 05:58:31 +00:00
Tongjun Gao
492d5e2bae change 'let mut' keyword completion into 'ietm' snippet 2025-03-04 12:04:54 +08:00
Tongjun Gao
0b9dbe7426 Improve keyword completion for 'let' and 'let mut' 2025-03-04 11:50:11 +08:00
Laurențiu Nicola
1d6f53e117 Bump minimum supported toolchain to 1.82 2025-03-03 16:03:06 +02:00
Lukas Wirth
03f90b0afa
Merge pull request #19261 from Veykril/push-rnqlyrvqpols
Support tuple struct patterns for expand_rest_pattern assist
2025-03-03 11:51:07 +00:00
Lukas Wirth
b685ada098
Merge pull request #19243 from Veykril/push-qrrqsywkwyzp
Allow unsetting default cfgs
2025-03-03 11:42:40 +00:00
Lukas Wirth
8ff0b67711
Merge pull request #19244 from Veykril/push-nmnrnlysvyvk
Warn when the used toolchain looks too old for rust-analyzer
2025-03-03 11:41:12 +00:00
Lukas Wirth
4ad546f6a6 Support tuple struct patterns for expand_rest_pattern assist 2025-03-03 12:35:53 +01:00
bit-aloo
af959f9031
Add dangling impl
- Adds dangling impl diagnostics
- Rename validation test from dangling_impl to dangling_iml_ref
2025-03-03 15:58:33 +05:30
Laurențiu Nicola
071eda7d91
Merge pull request #19269 from lnicola/sync-from-rust
minor: sync from downstream
2025-03-03 07:00:48 +00:00
Laurențiu Nicola
2244c99b69 Merge from rust-lang/rust 2025-03-03 08:38:46 +02:00
Chayim Refael Friedman
9e014a0e61
Merge pull request #19226 from Shourya742/2025-02-25-fix-completion-ref-matching
completion-ref-matching
2025-03-03 02:37:00 +00:00
Michael Davis
c9fdc48e86
Add identifier to pull diagnostic LSP capabilities
This field in the server capabilities instructs the client to maintain
the diagnostics received from a `textDocument/diagnostic` pull request
as a separate set from other diagnostics: namely those sent with classic
"push" diagnostics, `textDocument/publishDiagnostic`. rust-analyzer
emits "native" diagnostics (computed by rust-analyzer itself) in pull
diagnostics and separately emits cargo-based diagnostics with push, so
push and pull diagnostics should be different sets. Setting this field
instructs the client to avoid clearing push diagnostics when new pull
diagnostics arrive and vice versa.
2025-03-02 09:27:45 -05:00
bit-aloo
0b97ae26bf
add diagnostic for dangling impl 2025-03-02 19:42:42 +05:30
bit-aloo
afe6e5ba0f
add diagnostic for dangling dyn 2025-03-02 19:41:39 +05:30
Lukas Wirth
0f4e6104e0 Normalize some assist names 2025-03-02 09:09:12 +01:00
Lukas Wirth
7273d714af
Merge pull request #19259 from Veykril/push-skmvrmtorqso
Add flip or-pattern assist
2025-03-02 07:41:42 +00:00
Lukas Wirth
1ce1f087da
Merge pull request #19253 from ShoyuVanilla/migrate-convert-bool-then
internal: Migrate `convert_bool_then` to `SyntaxEditor`
2025-03-02 07:21:04 +00:00
Lukas Wirth
f7569a4426 Add flip or-pattern assist 2025-03-02 08:04:27 +01:00
Lukas Wirth
76567ee28d
Merge pull request #19251 from Veykril/push-tkmpqtzxynxk
Remove syntax editing from parenthesis computation
2025-03-01 17:46:07 +00:00
Lukas Wirth
570c6adcd3 Remove syntax editing from parenthesis computation 2025-03-01 18:32:04 +01:00
Lukas Wirth
716e9fdb8d Fix test_keyword_highlighting test 2025-03-01 18:29:47 +01:00
Lukas Wirth
8f319240b4 Cleanup string handling in syntax highlighting 2025-03-01 17:44:29 +01:00
Lukas Wirth
9200f77068 More precise macro modifiers for syntax highlighting 2025-03-01 17:23:51 +01:00
Lukas Wirth
487d682204 Cleanup highlighting macro-def handling 2025-03-01 16:54:40 +01:00
Shoyu Vanilla
37822d5917 Migrate convert_bool_then to SyntaxEditor
Update assist docs
2025-03-01 13:12:15 +09:00
Ralf Jung
5377cfb472 rename BackendRepr::Vector → SimdVector 2025-02-28 17:17:45 +01:00
Lukas Wirth
e92dc3fd80 Have inline_local_variable use precedence calculation for parentheses 2025-02-28 11:03:33 +01:00
Lukas Wirth
2c4ef382d6
Merge pull request #19249 from Veykril/push-noosrywrsuvn
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28 09:33:36 +00:00