1005 Commits

Author SHA1 Message Date
Lukas Wirth
97ac158aaa
Merge pull request #20193 from ChayimFriedman2/setting-rename-conflict
feat: Provide a setting to disable showing rename conflicts
2025-12-26 09:08:49 +00:00
jackh726
0dd3fe029a Add lsp extension to get failed trait obligations for a given function 2025-12-20 22:43:58 +00:00
Chayim Refael Friedman
36c9f6224c GC support for solver types
A GC is triggered every X revisions, and is synchronous, unfortunately.
2025-12-18 10:12:03 +02:00
benodiwal
87f13bb21b
feat: show parameter hint for missing arguments 2025-12-10 17:37:26 +05:30
A4-Tacks
e8ee597340
Add config hide placeholders type hints
In the inferred type hints, expand the line too long. add config to disable it.

Example
---
```json
{"rust-analyzer.inlayHints.typeHints.hideInferredTypes": true}
```

```rust
use std::collections::HashMap;
fn foo(iter: Vec<Result<HashMap<String, String>, std::io::Error>>) {
    let output = iter.into_iter().collect::<Result<Vec<_>, _>>().unwrap();
}
```

**Before this PR**

```rust
let output: Vec<HashMap<String, String>> = iter.into_iter().collect::<Result<Vec<_ = HashMap<String, String>>, _ = Error>>().unwrap();
```

**After this PR**

```rust
let output: Vec<HashMap<String, String>> = iter.into_iter().collect::<Result<Vec<_>, _>>().unwrap();
```
2025-12-05 02:09:59 +08:00
Chayim Refael Friedman
36fa19936b
Merge pull request #21156 from Wilfred/manual_formatting
Fix formatting issues in manual
2025-11-28 11:51:16 +00:00
Wilfred Hughes
1ce8ab347f Fix URLs and highlighting in manual 2025-11-28 11:39:40 +00:00
Wilfred Hughes
32b334b503 fix: rust-analyzer.imports.granularity.group should get a dropdown UI
VS Code only offers a dropdown if a the toplevel property description
is `enum`. For `anyOf` (a JSON schema feature), we don't get that
helpful UI.

Whilst the previous version marked `preserve` as deprecated, the VS
Code UI didn't do anything special when users chose that value.

Instead, use an enum so we get the helpful dropdown, and just use the
description to highlight the deprecated value.

Relevant docs:

https://code.visualstudio.com/api/references/contribution-points#:~:text=The%20enumDescriptions%20property%20provides%20a,will%20be%20parsed%20as%20Markdown.

https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.2.1.2
2025-11-28 11:01:57 +00:00
Aditya-PS-05
ba5ecc09ac feat: make dyn inlay hints configurable 2025-11-20 00:37:01 +05:30
Shoyu Vanilla (Flint)
2e2e3ebec9
Merge pull request #20927 from ChayimFriedman2/dhat
feat: Support memory profiling with dhat
2025-10-31 07:08:23 +00:00
Chayim Refael Friedman
1ba3165b81 Support memory profiling with dhat
Unfortunately, this requires a custom build of r-a, and it's quite slow.
2025-10-28 13:00:53 +02:00
Chayim Refael Friedman
4fddcc6d57 Provide an option to not show derives near the ADT for "Goto Implementations" or "Implementations" codelens
I don't do it by default, for three reasons: (1) it's more expensive, (2) I actually quite like seeing the derives, and they may expand to no impl/more than one impl, (3) if #19130 will ever be merged this will become even more useful.

Even a config might be too much, but it was fun and easy to code so I did that.
2025-10-28 08:34:16 +02:00
Chayim Refael Friedman
dc91c0a9f3 Provide a setting to disable showing rename conflicts 2025-10-27 18:04:33 +02:00
Michael Gruenewald
86ee444fff Add lodash 2025-10-13 15:02:45 +02:00
Shoyu Vanilla (Flint)
87ccc2b7c9
Merge pull request #20801 from ChayimFriedman2/fix-insert-use
minor: Small fixes for import insertion
2025-10-10 08:28:42 +00:00
Kirill Bulatov
d0e07f080b Replace --show-output with --nocapture
The former does not show any output before the test is finished, which prevents long-running/stuck tests from showing any useful information.
2025-10-05 22:28:00 +03:00
Chayim Refael Friedman
10db7ac7a4 Deprecate preserve import granularity option
It didn't do anything (behaved like `item`), as with `enforceGranularity = false` (which is the default), the style of the current file is always preferred, regardless of the setting.

We could make it fail when the setting is `preserve` and the current file's style could not be detected, but that makes little sense.

It is a bit weird that the default is `crate` but `preserve` falls back to `item`, however that was the previous behavior.
2025-10-05 15:19:52 +03:00
Chayim Refael Friedman
129d9f7af6 Clarify rust-analyzer.inlayHints.maxLength is not a hard guarantee 2025-09-22 04:16:50 +03:00
Bart Jacobs
d106d41fbc Add the rust-analyzer.semanticHighlighting.comments.enable configuration value 2025-09-17 15:46:23 +02:00
Chayim Refael Friedman
eaf71411a9 Add an option to remove reborrows from adjustment inlay hints
Reborrows are consecutive deref then ref. Make it the default because reborrows are mostly useless to the programmer.

Also rename `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "reborrow"` to `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "borrows"`, as it's not about reborrows but about any ref/deref and it's confusing with the new setting.
2025-08-24 02:26:37 +03:00
Wilfred Hughes
5c262a6f05 [internal] Update to the latest @vscode/vsce for extension build
This isn't a logic change, but it fixes an npm warning during the
build. vsce itself hasn't had any major changes between 3.2.2 and 3.6.

* https://github.com/microsoft/vscode-vsce/releases/tag/v3.3.0
* https://github.com/microsoft/vscode-vsce/releases/tag/v3.4.0
* https://github.com/microsoft/vscode-vsce/releases/tag/v3.5.0
* https://github.com/microsoft/vscode-vsce/releases/tag/v3.6.0
2025-08-13 15:25:34 +01:00
Ifeanyi Orizu
dc6e6d2b86 Add config option to exclude locals from doc search 2025-08-10 17:48:17 -05:00
Ifeanyi Orizu
76b2333c1b Update documentation for overrideCommand config options 2025-08-01 10:48:54 -05:00
Josh McKinney
fb219ae76c
Improve settings tree title and descriptions
- All settings are now phrased in the imperative form stating what the
  setting does rather than talking about what it controls. (E.g.:
  "Show `Debug` action." instead of "Whether to show `Debug` action"
- Categories are now displayed in title case
- Categories are now sorted lexicographically
- General category is removed (and all the settings are moved to the top
  level)
- Language for a few descriptions is made a bit less ambiguous
2025-07-02 22:12:46 -07:00
roifewu
c36758def4 refactor: rename branches to branch_exit_points in highlight_related 2025-06-26 13:41:41 +08:00
roifewu
f87220e22a feat: highlighting of related return values while the cursor is on any match, if, or match arm arrow (=>) 2025-06-26 13:41:39 +08:00
Lucas Holten
7492b63c18 Add better documentation for excluding imports from symbol search 2025-06-20 13:26:59 +02:00
Lukas Wirth
3ee81c7115 fix: Temporarily disable + typing handler as it moves the cursor position 2025-06-19 08:29:50 +02:00
Lukas Wirth
8661c59a7f
Merge pull request #19939 from ChayimFriedman2/fill-arms-self
feat: In "Fill match arms", allow users to prefer `Self` to the enum name when possible
2025-06-17 08:20:02 +00:00
Lukas Wirth
b1824c3962 feat: Insert required parentheses when typing + in trait type 2025-06-16 19:02:18 +02:00
Lucas Holten
dc85e3ee35 Add config option to exclude imports from symbol search 2025-06-15 02:41:35 +02:00
Chayim Refael Friedman
25a7b2480e In "Fill match arms", allow users to prefer Self to the enum name when possible
But default to not to.

I chose to have a more generic config name because maybe other assists could also use the same approach.
2025-06-06 16:34:53 +03:00
Shoyu Vanilla
e806957098 feat: Render padding information when hovering on structs 2025-05-28 14:18:50 +09:00
Lukas Wirth
262fcfbc58 Change import prefix default to be by crate
The current default plain, tends to create non-uniform import blocks over time, some being relative, some being absolute.
I believe we should encourage a different default here.
2025-05-19 08:44:05 +02:00
Lukas Wirth
05b374acd4 feat: Allow unsetting env vars in server.extraEnv config 2025-04-21 10:38:54 +02:00
bbb651
c7cf6bf7c3 doc: Fix dead manual links 2025-04-20 20:28:52 +03:00
bbb651
2ffcb99683 doc: Rework generated configuration to have anchors
Also first line of default code blocks being used as the language instead of json
and fixes a missing `json` language in a doc comment code block.
2025-04-20 19:29:54 +03:00
David Barsky
99a2b676bc internal: rename children_modules to child_modules 2025-04-09 12:43:49 -04:00
geetanshjuneja
1f7c3e8b92 added children modules 2025-04-07 21:14:01 +05:30
Prajwal S N
865681d779
feat(project-model): provide flag for no deps
A Cargo project can now be built without any dependency metadata being fetched.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-04 18:57:10 +05:30
Lukas Wirth
78f4146dc7 chore: Cleanup vscode extension output channels 2025-03-24 07:44:46 +01:00
BenjaminBrienen
86d140d31c Add view icons 2025-03-15 21:34:12 +01:00
Lukas Wirth
b685ada098
Merge pull request #19243 from Veykril/push-qrrqsywkwyzp
Allow unsetting default cfgs
2025-03-03 11:42:40 +00:00
BenjaminBrienen
00726cf697 Update Node.js, vscode, and ts deps 2025-02-27 20:53:48 +01:00
Lukas Wirth
5e18ad0770 Allow unsetting default cfgs 2025-02-27 17:34:29 +01:00
Chayim Refael Friedman
100e166bb1 Calculate drop glue and show it on hover
Also fix the `needs_drop()` intrinsic.

Unions also need this information (to err if they have a drop-needing field), but this will come in a follow-up PR.
2025-02-17 06:29:37 +02:00
Lukas Wirth
0e5a127607
Merge pull request #19136 from rust-lang/dependabot/npm_and_yarn/editors/code/esbuild-0.25.0
Bump esbuild from 0.18.12 to 0.25.0 in /editors/code
2025-02-12 11:48:43 +00:00
Lukas Wirth
78e7515a30
Merge pull request #18998 from ChayimFriedman2/exclude
fix: Make `rust-analyzer.files.excludeDirs` work, actually
2025-02-11 11:41:54 +00:00
dependabot[bot]
72257fc370
Bump esbuild from 0.18.12 to 0.25.0 in /editors/code
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.18.12 to 0.25.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.12...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 05:37:54 +00:00
jnyfah
4522bf42ca closure parameter inlay hints 2025-02-06 15:55:56 +01:00