Lukas Wirth
235d88bf42
Render more lifetimes
2025-05-02 14:36:18 +02:00
Matthias Krüger
573c47c9ba
remove a couple of clones
2025-05-01 11:41:42 +02:00
Lukas Wirth
e0dca847ad
fix: Improve parser recovery a bit
2025-04-30 16:40:01 +02:00
David Barsky
fe7b4f2ad9
Merge pull request #19699 from ChayimFriedman2/escape-label
...
fix: Escape raw names in labels properly
2025-04-28 21:12:21 +00:00
Lukas Wirth
7e526b6be7
Add expression fill mode variant for filling with underscore expressions
2025-04-28 10:39:36 +02:00
Chayim Refael Friedman
e6ebf0b8a1
Don't escape 'static
...
As it is a valid lifetime without escaping.
It does need to be escaped as a label, but we have no way to distinguish that.
2025-04-26 21:20:43 +03:00
Chayim Refael Friedman
d781d02cf4
Escape raw names in labels properly
2025-04-26 21:10:43 +03:00
Lukas Wirth
34e7d60e30
Merge pull request #19644 from ChayimFriedman2/const-syms
...
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
Lukas Wirth
a5540bd98d
Merge pull request #19604 from WtzLAS/fix-issue-19601
...
Add semicolon to use
2025-04-21 12:34:07 +00:00
Chayim Refael Friedman
0f325c7ff8
Remove unnecessary predefined symbol clones
...
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00
Chayim Refael Friedman
9477e46bec
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00
Chayim Refael Friedman
c58ddafe90
Make HirFileId
, EditionedFileId
and macro files Salsa struct
...
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Wtz_LASR
c0bc939053
add semicolon to use
2025-04-16 21:13:01 +08:00
Chayim Refael Friedman
8a9a1e3345
Remove all upcasts!
...
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
Lukas Wirth
7255ef1375
fix(auto-import): Prefer imports of matching types for argument lists
2025-04-08 09:21:32 +02:00
Lukas Wirth
bec545920a
Merge pull request #19447 from Natural-selection1/add_impl_for
...
add more completion about "impl"
2025-04-05 13:01:51 +00:00
BenjaminBrienen
2462624a7d
prefer default over new
2025-04-04 15:49:50 +02:00
Lukas Wirth
1e1571e1c8
fix: Fix new nightly lints
2025-03-31 13:27:54 +02:00
Hegui Dai
e3ec43319a
update test
2025-03-28 18:28:56 +08:00
Hegui Dai
307cd68fc6
move "impl<> for <>" and test about it
2025-03-28 18:25:32 +08:00
Chayim Refael Friedman
7b584ef9bf
Allow crate authors to control completion of their things
...
Via the new `#[rust_analyzer::completions(...)]` attribute.
Also fix a bug with existing settings for that where the paths wouldn't resolve correctly.
2025-03-27 14:01:26 +02:00
Hegui Dai
edd450abc9
add more completion about "impl"
2025-03-25 14:31:28 +08:00
Lukas Wirth
500ea05aef
chore: Bump dependencies
2025-03-23 08:46:10 +01:00
Lukas Wirth
32fa60f3a6
Merge pull request #19412 from Veykril/push-krktmvxmlxmt
...
chore: Remove some unnecessary usage of `Semantics`
2025-03-21 19:25:41 +00:00
Lukas Wirth
3086e5fe90
chore: Remove some unnecessary usage of Semantics
2025-03-21 20:09:03 +01:00
gvozdvmozgu
7393d851a6
add postfix completion for const block
2025-03-19 16:15:32 -07:00
Lukas Wirth
a505420751
chore: Bump Edition::CURRENT
to 2024
2025-03-17 12:29:19 +01:00
Lukas Wirth
6a637879ac
minor: Remove unnecessary allocations in function::params_display
2025-03-16 15:19:25 +01:00
Lukas Wirth
8b5816b4f5
Merge pull request #19363 from euclio/varargs-detail
...
display varargs in completion detail
2025-03-16 13:43:11 +00:00
Andy Russell
e9403853c0
display varargs in completion detail
2025-03-15 16:36:14 -04:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
Lukas Wirth
8e8d997304
Split enum variants out of enum_data
query
2025-03-14 13:32:53 +01:00
David Barsky
74620e64ec
internal: port rust-analyzer to new Salsa
2025-03-10 13:30:51 -04:00
Lukas Wirth
f81fcabdf9
Merge pull request #19332 from Veykril/push-trvznlqsvtyq
...
Make change annotations per text-edit
2025-03-10 11:25:13 +00:00
Lukas Wirth
70066399f0
Make change annotations per text-edit
2025-03-10 12:08:42 +01:00
Lukas Wirth
27a5b1ba0c
Merge pull request #19330 from ChayimFriedman2/normalize-projection
...
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10 09:15:35 +00:00
Lukas Wirth
cf255a61d5
Merge pull request #19079 from ChayimFriedman2/rename-conflict
...
feat: Warn the user when a rename will change the meaning of the program
2025-03-10 08:59:43 +00:00
Lukas Wirth
7202146f65
Rank ADT constructors as constructors for completion scoring
2025-03-09 15:36: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
Chayim Refael Friedman
62e7d2851b
Warn the user when a rename will change the meaning of the program
...
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it.
We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06 21:07:10 +02:00
Chayim Refael Friedman
2fc0dc0f13
Pass the target crate in HirFormatter
...
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-06 21:00:05 +02:00
Tongjun Gao
98b1d5e8a3
Adjust relevance scoring threshold to consistent with existing implementations
2025-03-06 10:14:39 +08: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
Tongjun Gao
3ef8a371e8
add test cases for 'letm' keyword completion
2025-03-05 17:26:30 +08:00
Thalia Archibald
0aa623e108
minicore: Add size_of to prelude and add rust_2024 prelude
2025-03-05 00:30:38 -08: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
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
bit-aloo
dcb25b1a8c
add test
2025-02-28 10:03:03 +05:30