Lukas Wirth
a91b571b5f
Merge pull request #19029 from Veykril/push-wklzwzqvkrou
...
internal: Skip redundant path search in `resolve_completion_edits`
2025-01-25 12:17:22 +00:00
Lukas Wirth
5d94c97ddb
Skip redundant path search in resolve_completion_edits
2025-01-25 13:03:01 +01:00
Lukas Wirth
58401ab0c8
Merge pull request #19028 from Veykril/push-vuytpkvqzwzs
...
fix: Fix flyimport not filtering via stability of import path
2025-01-25 11:34:36 +00:00
Lukas Wirth
0db8d05b52
Fix flyimport not filtering via stability of import path
2025-01-25 12:18:54 +01:00
Lukas Wirth
f45b8ad7f8
Merge pull request #19026 from Veykril/push-wrxrutptywzx
...
Only collect implicit visibile use symbols if they have renames
2025-01-25 10:27:26 +00:00
Lukas Wirth
592eceedf5
Only collect implicit visibile use symbols if they have renames
...
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-25 11:12:06 +01:00
Lukas Wirth
37fc7ee6bb
Merge pull request #18973 from ThouCheese/feat/nice-niches
...
Make niches into nices
2025-01-25 09:17:05 +00:00
Lukas Wirth
7a7eb69f96
Merge pull request #19023 from Wilfred/sequence_type_names
...
minor: Suggest better names when a type is a sequence
2025-01-25 08:13:42 +00:00
Lukas Wirth
165d78a245
Merge pull request #19019 from darichey/add-buildfiles
...
Explicitly add buildfiles when constructing ProjectFolders
2025-01-25 08:02:38 +00:00
Wilfred Hughes
fff24d52ee
minor: Suggest better names when a type is a sequence
...
Previously, we'd suggest a type of `vec` for a value of type `Vec<T>`,
which is rarely what the user wants. We also had no suggestions for
values of type `&[T]`.
Instead, try to pluralise the inner type name, and fall back to
`items`.
2025-01-24 11:30:19 -08:00
David Richey
0a14e17523
Explicitly add buildfiles when constructing ProjectFolders
2025-01-24 09:59:06 -06:00
Lukas Wirth
8063b1ec04
Merge pull request #19018 from Veykril/push-wxqqunxwrply
...
internal: Record the use tree index in glob imports
2025-01-24 14:27:49 +00:00
Lukas Wirth
51b323f1b2
Merge pull request #18991 from Veykril/push-rmqmnrymwmoz
...
Keep already computed inlay hint properties instead of late resolving them
2025-01-24 14:27:43 +00:00
Lukas Wirth
b44570fd5e
Lazily compute location links in type hints again
2025-01-24 15:13:10 +01:00
Lukas Wirth
1e5f47bf09
Record the use tree index in glob imports
2025-01-24 15:12:48 +01:00
Lukas Wirth
3e6a9330d8
Merge pull request #19012 from ShoyuVanilla/arbitrary-self
...
feat: Implement `arbitrary-self-types`
2025-01-24 14:04:34 +00:00
Shoyu Vanilla
024da87502
feat: Implement arbitrary-self-types
2025-01-24 22:50:59 +09:00
Lukas Wirth
b7997e06ba
Merge pull request #19017 from Veykril/push-uktrsknwmsvy
...
fix: Fix flycheck panicking with "once" invocation strategy
2025-01-24 13:37:17 +00:00
Lukas Wirth
c3e88ae1c6
Merge pull request #18993 from ChayimFriedman2/iter-config
...
feat: Provide a config to control auto-insertion of `await` and `iter()`
2025-01-24 13:31:30 +00:00
Lukas Wirth
5d9df43c72
Merge pull request #18994 from Wilfred/failed_rustc_cfg_as_warning
...
internal: Treat cfg fetching failures as a warning
2025-01-24 13:31:00 +00:00
Lukas Wirth
2a9e6fbe90
Merge pull request #19016 from Veykril/push-moqnsytyrupu
...
fix: Fix `ItemScope` not recording glob imports
2025-01-24 13:25:39 +00:00
Lukas Wirth
dfd94903c8
fix: Fix flycheck panicking with "once" invocation strategy
...
We only ever have one flycheck runner no matter the number of workspaces, so just kick off flycheck for it immediately
2025-01-24 14:23:11 +01:00
Lukas Wirth
a365f732ea
Merge pull request #19014 from darichey/fix-cfg-macro
...
Check cfg when collecting macro defs
2025-01-24 13:13:48 +00:00
Lukas Wirth
99b0ab5f52
Fix ItemScope not recording glob imports
...
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-24 14:11:45 +01:00
David Richey
27084a25a4
Check cfg when collecting macro defs
2025-01-23 17:36:45 -06:00
Laurențiu Nicola
7ba18daca7
Merge pull request #19009 from lnicola/dont-just-die
...
minor: Rephrase comment
2025-01-23 12:09:49 +00:00
Laurențiu Nicola
a32f64dc30
Rephrase comment
2025-01-23 13:52:39 +02:00
Chayim Refael Friedman
3ca106683e
Merge pull request #19004 from teoxoy/patch-1
...
increase `AUTODEREF_RECURSION_LIMIT` to 20
2025-01-22 21:36:12 +00:00
Teodor Tanasoaia
2eef052f04
increase AUTODEREF_RECURSION_LIMIT to 20
...
The limit was introduced in https://github.com/rust-lang/rust-analyzer/pull/1408#discussion_r294059044 to avoid infinite cycles but it effectively caps the number of derefs to 10. Types like `ID3D12Device14` from the `windows` crate run into this because it derefs to `ID3D12Device13`, 13 to 12 and so on. Increasing it to 20 is a quick fix; a better cycle detection method would be nicer long term.
2025-01-22 22:21:02 +01:00
Laurențiu Nicola
fa272edebb
Merge pull request #18878 from Wilfred/document_build_info
...
manual: Document all rust-project.json fields
2025-01-22 06:27:41 +00:00
Wilfred Hughes
98582b23ab
manual: Document all rust-project.json fields
...
Ensure that all the fields that rust-analyzer understands are in the
manual, they all have doc comments, and they use consistent
punctuation (`;` rather than mixing `,` and `;`).
Whilst we're here, fix the `sysroot_src` example and add 2024 as a
legal value for Rust edition.
2025-01-21 12:00:13 -08:00
Wilfred Hughes
c5ccf86e90
internal: Treat cfg fetching failures as a warning
...
If the user doesn't have rustc on $PATH, rust-analyzer won't be able
to run `rustc --print cfg`. This isn't really an error, as
rust-analyzer can still proceed without it.
This is particularly noticeable when loading crates defined in a
rust-project.json. Until the configuration is loaded, the opened files
are briefly treated as detached files and users see this error.
Environments with rust-project.json generally have a sysroot and rustc
elsewhere, so the error confuses users.
2025-01-21 11:07:07 -08:00
Chayim Refael Friedman
5059c1a870
Provide a config to control auto-insertion of await and iter()
2025-01-21 18:51:09 +02:00
Lukas Wirth
802d9d5386
Keep already computed inlay hint properties instead of late resolving them
2025-01-21 16:16:51 +01:00
Lukas Wirth
284e0cd749
Make InlayHint::linked_location computation lazy
2025-01-21 16:16:50 +01:00
Luuk Wester
d8553c9c05
remove is_pwr2
2025-01-21 14:47:07 +01:00
Luuk Wester
e08f6d4530
switch from using leading zeros to trailing zeros
2025-01-21 14:45:30 +01:00
Lukas Wirth
f0f7204892
Fix Param::as_local treating closures wrong
2025-01-21 11:15:36 +01:00
Chayim Refael Friedman
a238ab88f1
Merge pull request #18988 from ChayimFriedman2/iter-relevance
...
fix: Sort completion items that skip `await` and `iter()` behind those that don't
2025-01-21 09:58:19 +00:00
Chayim Refael Friedman
feb3fb5f19
Sort completion items that skip await and iter() behind those that don't
...
I don't think my ranking is perfect, because it places them even behind snippet completions, but this is something.
2025-01-21 11:44:38 +02:00
Luuk Wester
398cd2dbf6
make large niche description more terse, switch to using u128::is_power_of_two
2025-01-21 10:33:28 +01:00
Lukas Wirth
4308352b42
Merge pull request #18986 from Veykril/push-zlwvwlowpzqm
...
Goto `Display::fmt` when invoked on `to_string`
2025-01-21 09:25:05 +00:00
Lukas Wirth
4b716bbb4c
Merge pull request #18990 from Veykril/push-tqonnqxyrnsv
...
internal: Cleanup `Name` string rendering
2025-01-21 09:24:42 +00:00
Lukas Wirth
54d1d318d3
Cleanup Name string rendering
2025-01-21 10:05:32 +01:00
Lukas Wirth
0870bfbfc7
Merge pull request #18977 from ChayimFriedman2/fix-upmapping
...
fix: Fix missing upmapping in trait impls completion
2025-01-21 07:41:22 +00:00
Lukas Wirth
6291e1d611
Merge pull request #18989 from Giga-Bowser/syntax-tree-refresh
...
fix: Only refresh syntax tree view when the active document changes
2025-01-21 07:23:22 +00:00
Chayim Refael Friedman
f98e971520
Fix another bug with completion of trait items inside macros
...
This time, when completing the keyword (e.g. `fn` + whitespace).
The bug was actually a double-bug:
First, we did not resolve the impl in the macro-expanded file but in the real file, which of course cannot work.
Second, in analysis the whitespace was correlated with the `impl` and not the incomplete `fn`, which caused fake (where we insert an identifier after the whitespace) and real expansions to go out of sync, which failed analysis. The fix is to skip whitespaces in analysis.
2025-01-20 21:21:42 +02:00
Giga Bowser
1d5af89654
fix: Only refresh syntax tree view when the active document changes
2025-01-20 14:05:19 -05:00
Lukas Wirth
e9b410d29c
Goto Display::fmt when invoked on to_string
2025-01-20 17:00:28 +01:00
Lukas Wirth
ea3897b35a
Merge pull request #18984 from Veykril/push-nszlmxoxyxss
...
internal: Move dual blanket impl logic from source analyzer to goto_def
2025-01-20 15:47:43 +00:00