Commit graph

1193 commits

Author SHA1 Message Date
bors
0402da4cbf Auto merge of #18265 - kouhe3:master, r=Veykril
Add support for LLDB-DAP
2024-10-14 12:21:42 +00:00
David Richey
0260e41283 Run subprocesses async in vscode extension 2024-10-10 20:44:13 -05:00
kouhe3
9a207be986 prettier format 2024-10-08 17:50:29 +08:00
kouhe3
e9c8a84a35 semicolon 2024-10-08 17:47:54 +08:00
kouhe3
64caa6bbf1 fix array sourceMap 2024-10-08 17:43:02 +08:00
kouhe3
82b114dbf0 lldbdap env dict to string 2024-10-08 15:11:31 +08:00
kouhe3
85caf88b54 add knownEngines lldb-dap 2024-10-08 00:22:58 +08:00
bors
e1a76671af 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
ac4edbf9dc fix: Fix bootstrap error message being incorrect 2024-10-01 12:33:53 +02:00
bors
ceee056af6 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
4ea09dd9f6 Provide an config option to not set cfg(test) 2024-09-30 00:12:45 +03:00
Noah Bright
01aaa53ef2 Update handlers.rs to handlers/requests.rs 2024-09-28 06:17:22 -04:00
bors
62649a57be 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
b4f278b463
Changes for debug restarting 2024-09-25 15:02:36 +02:00
David Richey
ac6a3f82cd Remove rust-analyzer.workspace.discoverProjectRunner 2024-08-16 09:50:45 -05:00
Lukas Wirth
7e94f3fd3c Reorganize debug.ts 2024-08-05 16:06:25 +02:00
bors
670a5ab4a9 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
huntc
77e6999536 Corrected precedence position 2024-07-31 21:24:56 +10:00
huntc
719631b75c Formatting 2024-07-30 19:25:03 +10:00
huntc
37d4cf0cc6 Outdated comment removed 2024-07-30 19:24:15 +10:00
huntc
26691a1165 Further simplifications 2024-07-30 16:38:47 +10:00
huntc
b05def0f4c Checks date for any RA 2024-07-30 16:26:56 +10:00
bors
a021b85be5 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
ec7451cc8d 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
917ed63095
feat: add trace level to client logs 2024-07-27 21:59:12 -07:00
Josh McKinney
45a881313a
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
38817263e4 fix: tweak hover/tooltip links 2024-07-26 23:13:55 +08:00
Lukas Wirth
7beac14cba Internal: Cleanup proc-macro error handling 2024-07-26 14:38:19 +02:00
David Barsky
2783aa7312 internal: remove UnindexedProject notification
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
2024-07-23 13:34:04 -04:00
bors
44f1eb415c 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
02c8b7df64 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
5b1a5a250b
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
Joel Daniel Rico
430768064f remove rust-analyzer.openFAQ 2024-07-19 08:11:16 -07:00
Lukas Wirth
33ce9a4211 Set RUSTC_SYSROOT for runnables 2024-07-16 13:48:14 +02:00
bors
8efe8a8528
Trigger VSCode to rename after extract variable assist is applied
When the user applies the "Extract Variable" assist, the cursor is
positioned at the newly inserted variable. This commit adds a command
to the assist that triggers the rename action in VSCode. This way, the
user can quickly rename the variable after applying the assist.

Fixes part of: #17579
2024-07-12 19:06:19 -07:00
bors
1adb52cde6 Auto merge of #17549 - Veykril:runnables-fix, r=Veykril
fix: Fix runnables being incorrectly constructed

I've misunderstood parts of the code here which caused runnables to arbitrarily break :) (I have yet to understand the conditions that made them break though, there is some odd caching involved I feel like ...)
Fixes https://github.com/rust-lang/rust-analyzer/issues/17402
2024-07-06 18:24:30 +00:00
Lukas Wirth
bb9678ea3b fix: Fix runnables being incorrectly constructed 2024-07-06 20:23:14 +02:00
bors
c888c0f109 Auto merge of #17548 - Veykril:debug-fix, r=Veykril
fix: Fix passing `message-format` after -- in debugging

Fixes https://github.com/rust-lang/rust-analyzer/pull/17495#issuecomment-2211717224
2024-07-06 16:04:53 +00:00
Lukas Wirth
7733403056 Fix passing message-format after -- in debugging 2024-07-06 18:03:33 +02:00
bors
35db3f5a03 Auto merge of #17547 - Veykril:runnables-env, r=Veykril
internal: Clean up runnable lsp extension

This feels like a natural addition to me, and also allows us to drop the expect-test hardcoding from the extension. Additionally, `cargoExtraArgs` is pointless, all the client will do is merge it with `cargoArgs` so the server can do that instead of delegating that to the client.
2024-07-06 15:02:41 +00:00
Lukas Wirth
3d7ee9b4ea Flatten cargoExtraArgs away from the runnable lsp extension 2024-07-06 16:36:27 +02:00
Lukas Wirth
fcddcf2ee5 Add environment to runnable lsp extension 2024-07-06 16:20:25 +02:00
bors
78d5f05e70 Auto merge of #17508 - jjoeldaniel:landing-page, r=Veykril
feat: Add landing/faq walkthrough pages

This is a basic implementation of a landing and FAQ page; I've included the bare-bones information as well as a [recommended section on inlay hints](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Landing.20Page/near/446135321).

I've also added `rust-analyzer: Open Walkthrough` and `rust-analyzer: Open FAQ` commands for ease of access.

I am hoping to create a small list of FAQ to include that might be useful as well as any other information I may have missed in the landing page. Feel free to share any suggestions!

![landing/faq page demo](https://github.com/rust-lang/rust-analyzer/assets/100006388/4644e4f0-4555-4b29-83c1-b048084ad63d)

cc #13351
2024-07-06 13:59:36 +00:00
Joel Daniel Rico
57497645f8 Add landing/faq walkthroughs and commands for quick access 2024-06-28 11:13:12 -07:00
Andrei Listochkin
cb523fc88a
pass cargo extra args when debug
fixes #17128
2024-06-25 18:13:08 +01:00
Wilfred Hughes
e62bc2d1f5 fix: Improve hover text in unlinked file diagnostics
Use full sentences, and mention how to disable the diagnostic
if users are intentionally working on unowned files.
2024-06-20 09:32:48 -07:00
panicbit
792155e790 remove panicbit.cargo extension warning 2024-06-19 15:37:09 +02:00
bors
87ee18da54 Auto merge of #17438 - jjoeldaniel:toggle_lsp_logs, r=Veykril
feat: add `toggleLSPLogs` command

Implement client-side command to toggle LSP logs in VSCode.

The command replaces the need to add/remove the `"rust-analyzer.trace.server": "verbose"` setting each time one wants to display logs. I've also updated the docs/ instances that reference the now outdated manual method.

The command labeled `rust-analyzer: Toggle LSP Logs` enables the setting project-wide and opens the relevant trace output channel.

Closes #8233
2024-06-19 08:39:42 +00:00
Lukas Wirth
ff07caa9de Tidy up vscode extension a bit 2024-06-19 09:42:06 +02:00
Lukas Wirth
8846b5cf4a Fix and cleanup VSCode task building 2024-06-17 14:06:01 +02:00