Commit graph

107 commits

Author SHA1 Message Date
bors
d764d87c9f Auto merge of #18291 - roife:fix-issue-18212, r=Veykril
feat: respect references.exclude_tests in call-hierarchy

close #18212

### Changes

1. feat: respect `references.exclude_tests` in call-hierarchy
2. Modified the description of `references.exclude_tests`
2024-10-14 12:50:40 +00:00
bors
a4df972532 Auto merge of #18265 - kouhe3:master, r=Veykril
Add support for LLDB-DAP
2024-10-14 12:21:42 +00:00
roife
7bc615050f feat: respect references.exclude_tests in call-hierarchy 2024-10-13 05:19:28 +08:00
David Richey
0460ff71b2 Run subprocesses async in vscode extension 2024-10-10 20:44:13 -05:00
kouhe3
a2304baaf2 prettier format 2024-10-08 17:50:29 +08:00
kouhe3
3918e29fac semicolon 2024-10-08 17:47:54 +08:00
kouhe3
63b0e270fb fix array sourceMap 2024-10-08 17:43:02 +08:00
kouhe3
90e3c8885c lldbdap env dict to string 2024-10-08 15:11:31 +08:00
kouhe3
87baa0e380 add knownEngines lldb-dap 2024-10-08 00:22:58 +08:00
bors
b91eeae559 Auto merge of #18219 - Veykril:veykril/push-ytnzuvtoswqz, r=Veykril
fix: Fix bootstrap error message being incorrect

precedence ...
2024-10-01 10:36:27 +00:00
Lukas Wirth
7f8bd7e7ac fix: Fix bootstrap error message being incorrect 2024-10-01 12:33:53 +02:00
bors
1ca85ac706 Auto merge of #18085 - ChayimFriedman2:gate-test, r=Veykril
feat: Provide an config option to not set `cfg(test)`

Fixes #17957.
2024-09-30 06:32:20 +00:00
Chayim Refael Friedman
923cb99142 Provide an config option to not set cfg(test) 2024-09-30 00:12:45 +03:00
Noah Bright
99b26382d8 Update handlers.rs to handlers/requests.rs 2024-09-28 06:17:22 -04:00
bors
3f22f7def5 Auto merge of #17923 - basvandriel:feature/build-before-restart-debug, r=Veykril
Building before a debugging session was restarted

# Background
Resolves #17901. It adds support for rebuilding after debugging a test was restarted. This means the test doesn't have to be aborted and manually re-ran again.

# How this is tested
First, all the Visual Studio Code extensions are loaded into an Extension Host window. Then, a sample test like below was ran and restarted to see if it was correctly rebuild.

```rust
#[test]
fn test_x() {
    assert_eq!("1.1.1", "1.1.0");
}
```
2024-09-27 11:06:21 +00:00
Bas van Driel
b204f48b5b
Changes for debug restarting 2024-09-25 15:02:36 +02:00
Chayim Refael Friedman
ca262a34ac Automatically add semicolon when completing unit-returning functions
But provide a config to suppress that.

I didn't check whether we are in statement expression position, because this is hard in completion (due to the natural incompleteness of source code when completion is invoked), and anyway using function returning unit as an argument to something seems... dubious.
2024-09-08 23:41:16 +03:00
Chayim Refael Friedman
8116b62fd2 Provide an option to hide deprecated items from completion 2024-09-01 01:04:21 +03:00
Lukas Wirth
b2062ea49f Improve documentation for InvocationStrategy 2024-08-19 14:23:05 +02:00
Victor Song
1bfb362d7f chore(config): remove invocationLocation in favor of invocationStrategy
These flags were added to help rust-analyzer integrate with repos
requiring non-Cargo invocations. The consensus is that having two
independent settings are no longer needed. This change removes
`invocationLocation` in favor of `invocationStrategy` and changes
the internal representation of `InvocationStrategy::Once` to hold
the workspace root.
2024-08-19 02:25:40 -05:00
David Richey
6fc487d2cc Remove rust-analyzer.workspace.discoverProjectRunner 2024-08-16 09:50:45 -05:00
Ali Bektas
7af01f7c90 Allow rust-project.json to be hidden 2024-08-07 03:27:03 +02:00
bors
64cd3da35d Auto merge of #17772 - Veykril:debug.ts, r=Veykril
internal: Reorganize debug.ts
2024-08-05 14:21:45 +00:00
Lukas Wirth
d95a4b8d2b Reorganize debug.ts 2024-08-05 16:06:25 +02:00
Lukas Wirth
ef7d2c5d65 feat: Load sysroot library via cargo metadata 2024-08-05 12:18:19 +02:00
bors
d646f7b258 Auto merge of #17705 - huntc:resolve-ra, r=Veykril
feat: Use oldest rustup rust-analyzer when toolchain override is present

Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole.

In terms of precedence:

nightly > stable-with-version > stable

With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win.

Fixes #17663
2024-08-02 06:50:43 +00:00
Wilfred Hughes
1df27d84a1 docs: Fix JSON example for rust-analyzer.workspace.discoverConfig
The user does not specify `{arg}` in their JSON, and be pedantic about
commas in JSON sample.
2024-07-31 16:10:42 -07:00
huntc
8ca9034d1f Corrected precedence position 2024-07-31 21:24:56 +10:00
huntc
af4a59b985 Formatting 2024-07-30 19:25:03 +10:00
huntc
440b8befaa Outdated comment removed 2024-07-30 19:24:15 +10:00
huntc
6b4c0e03f8 Further simplifications 2024-07-30 16:38:47 +10:00
huntc
786ef8393c Checks date for any RA 2024-07-30 16:26:56 +10:00
bors
722f79d374 Auto merge of #17707 - Veykril:proc-macro-err-cleanup, r=Veykril
feat: Use spans for builtin and declarative macro expansion errors

This should generally improve some error reporting for macro expansion errors. Especially for `compile_error!` within proc-macros
2024-07-29 14:07:33 +00:00
huntc
a22aeb2c75 Determine toolchain RA on age
Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole.

In terms of precedence:

nightly > stable-with-version > stable

With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win.
2024-07-28 16:09:05 +10:00
Josh McKinney
2f0451d113
feat: add trace level to client logs 2024-07-27 21:59:12 -07:00
Josh McKinney
c0df26be42
feat: use vscode log format for client logs
This change updates the log format to use the vscode log format instead
of the custom log format, by replacing the `OutputChannel` with a
`LogOutputChannel` and using the `debug`, `info`, `warn`, and `error`
methods on it. This has the following benefits:

- Each log level now has its own color and the timestamp is in a more
  standard format
- Inspect output (e.g. the log of the config object) is now colored
- Error stack traces are now shown in the output
- The log level is now controlled on the output tab by clicking the gear
  icon and selecting "Debug" or by passing the `--log` parameter to
  vscode. The `trace.extension` setting has been marked as deprecated.
2024-07-27 21:43:35 -07:00
Young-Flash
8cdc4932ee fix: tweak hover/tooltip links 2024-07-26 23:13:55 +08:00
Lukas Wirth
f6e2fca74b Internal: Cleanup proc-macro error handling 2024-07-26 14:38:19 +02:00
David Barsky
06fe4e6b6e internal: remove UnindexedProject notification
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
2024-07-23 13:34:04 -04:00
PaulDotSH
fdbd9bee57 Remove lens.forceCustomCommands config 2024-07-23 03:27:28 -04:00
bors
3e33854080 Auto merge of #17667 - Veykril:r-a-component-override, r=Veykril
Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace

Fixes https://github.com/rust-lang/rust-analyzer/issues/17663
2024-07-22 08:54:06 +00:00
Lukas Wirth
74cc2802b9 Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace 2024-07-22 10:49:32 +02:00
Josh McKinney
539df3fca9
Rename rust-analyzer commands
The commands `editor.action.triggerParameterHints` and
`editor.action.rename` are now renamed to
`rust-analyzer.triggerParameterHints` and `rust-analyzer.rename`

This change helps make it clear that these commands are specific to
rust-analyzer and not part of the default set of commands provided by
VSCode.

Fixes: https://github.com/rust-lang/rust-analyzer/issues/17644
2024-07-20 01:11:14 -07:00
bors
b939d3bf30 Auto merge of #17639 - Veykril:salsa-perf, r=Veykril
Some more small salsa memory improvements

This does limit our lru limits to 2^16 but if you want to set them higher than that you might as well not set them at all. Also makes `LRU` opt-in per query now, allowing us to drop all the unnecessary LRU stuff for most queries
2024-07-19 18:45:16 +00:00
Lukas Wirth
59ec98218f Regenerate files 2024-07-19 18:39:42 +02:00
Joel Daniel Rico
346210bb1b remove rust-analyzer.openFAQ 2024-07-19 08:11:16 -07:00
bors
40730a4baf Auto merge of #17246 - davidbarsky:david/move-rust-project-generation-to-server, r=Veykril
feature: teach rust-analyzer to discover `linked_projects`

This PR's been a long-time coming, but like the title says, it introduces server-side project discovery and removes the extension hooks I previously introduced. I don't think this PR is ready to land, but here are the things I'm feeling squishy about:
- I don't think I like the idea of introducing the `cargo-metadata` command-but-for-everything-else in the `flycheck` module, but the progress reporting infrastructure was too convenient to pass up. Happy to move it elsewhere.

Here are the things I _know_ I need to change:
- For progress reporting, I'm extracting from a `serde_json::Value` that corresponds to `tracing_subsciber::fmt::Layer`'s JSON output. I'd like to make this a bit more structured/documented than the current nonsense I wrote.
- The progress reporting currently hardcodes "Buck"; it should be deriving that from the previously mentioned more-structured-output.
- This doesn't handle *reloading* when a corresponding buildfile is changed. It should be doing that.

<details>
<summary>Anyway, here's a video of rust-analyzer discovering a Buck target.</summary>

https://github.com/rust-lang/rust-analyzer/assets/2067774/be6cd9b9-2c9a-402d-847f-05f860a91df1
</details>
2024-07-18 16:15:31 +00:00
David Barsky
2e582ad848 feature: move linked_projects discovery to the rust-analyzer server 2024-07-18 12:01:27 -04:00
Lukas Wirth
736723d435 Update test fixtures 2024-07-18 09:09:31 +02:00
bors
d95ce94543 Auto merge of #17616 - Veykril:config-param-hints, r=Veykril
Fix incorrect generic parameter hint defaults

Missed this in the review but we should show const param hints, not lifetime param hints by default
2024-07-17 06:54:06 +00:00