Commit Graph

219 Commits

Author SHA1 Message Date
hkalbasi 34cde2cebc Prompt the user to reload the window when enabling test explorer 2024-03-29 18:08:16 +03:30
Lukas Wirth 1c6d1b4f2a fix: Add config and capability for test explorer 2024-03-06 19:20:58 +01:00
Lukas Wirth 3fc043ce9b internal: Remove unnecessary Arc allocations in macro_expand 2024-01-03 15:21:18 +01:00
dfireBird ab091b73d0 Add config for the default click action of extension status bar 2023-10-04 21:07:50 +05:30
David Barsky b1b044f2d5 code: yeet rust-analyzer.discoverProjectCommand 2023-09-05 12:38:33 -04:00
Lukas Wirth e76d20e072 Add status bar button to toggle check on save state 2023-08-15 11:39:53 +02:00
vsrs 3468b093bd Platform specific runnables env 2023-07-18 17:51:57 +07:00
Tetsuharu Ohzeki f7823f3106 editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
Tetsuharu Ohzeki 445b4fc27f editor/code: Sort the style to import types
see:
- https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md
- https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md
2023-07-11 06:12:00 +09:00
bors 09f666b51b Auto merge of #15227 - DropDemBits:indent-on-blank-line, r=lnicola
fix: Indent after pressing enter on a blank line

Regressed after https://github.com/rust-lang/rust-analyzer/pull/13975 (whoops).
2023-07-07 09:06:56 +00:00
DropDemBits ebaf8c8135 fix: Indent after pressing enter on a blank line 2023-07-06 23:25:02 -04:00
Tetsuharu Ohzeki f70845305f editor/code: Enable noPropertyAccessFromIndexSignature ts option 2023-07-06 16:17:02 +09:00
Tetsuharu Ohzeki 72a3883a71 editor/code: Enable noUncheckedIndexedAccess ts option
https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess
2023-07-06 16:17:02 +09:00
Alex Kladov 832a64e290 feat: don't add panics to error jump list by default
To re-enable this, use

    "rust-analyzer.runnables.problemMatcher": [
        "$rustc",
        "$rust-panic"
    ],

setting.

closes: #14977
2023-06-30 22:23:13 +01:00
Mohsen Alizadeh 3f70117d69 fallback to old key 2023-06-28 21:24:28 -07:00
Mohsen Alizadeh 6c3e15aaa0 13583 rename runnable env to runnables extra env 2023-06-25 17:26:04 -07:00
David Barsky 7dfef85be6 fix: add a toggle to disable the dependency explorer. 2023-05-26 11:50:07 -04:00
Lukas Wirth cf8f13b531 fix: Fix restart server button trying to start instead of restart the server 2023-04-28 21:34:31 +02:00
David Barsky bd545a1c10 Address review comments 2023-03-14 12:49:35 -04:00
David Barsky 8d9bff0c74 Add a workspace config-based approach to reloading discovered projects. 2023-03-13 13:30:19 -04:00
David Barsky 46e022098f fmt 2023-03-13 13:30:19 -04:00
David Barsky 8af3d6367e This commit add Cargo-style project discovery for Buck and Bazel users.
This feature requires the user to add a command that generates a
`rust-project.json` from a set of files. Project discovery can be invoked
in two ways:

1. At extension activation time, which includes the generated
   `rust-project.json` as part of the linkedProjects argument in
    InitializeParams
2. Through a new command titled "Add current file to workspace", which
   makes use of a new, rust-analyzer specific LSP request that adds
   the workspace without erasing any existing workspaces.

I think that the command-running functionality _could_ merit being
placed into its own extension (and expose it via extension contribution
points), if only provide build-system idiomatic progress reporting and
status handling, but I haven't (yet) made an extension that does this.
2023-03-13 13:30:18 -04:00
bors 8011029d3a Auto merge of #13975 - DropDemBits:on-enter-after-dot-chains, r=DropDemBits
fix: Suppress extra indent after the end of field and function chains

(spurred on by <https://github.com/rust-lang/rust-analyzer/issues/4182#issuecomment-671275652>)

Caveat that this doesn't work for after tail expressions, although there shouldn't be anything after those anyways.

This also complicates when to reload the language configuration by nature of now always having a language configuration applicable.

Examples of indentation fixes:

```rs
fn main() {
    println!("Hello!"); // < enter here!
    // ... indents down here

    fs::read_to_string("soup") // < enter here!
    // ... still indents down here :(
        .map(|_| ())
        .map(|_| ()) // < enter here!
        // ... still indents down here :D
        .map_err(|_| ())
        .unwrap(); // < enter here!
    // ... indents down here :D

    // ... and subsequent enters stay at the same indent

    0.0f64
        .to_radians()
        .to_radians()
        .to_radians() // force semi on a new line
        ; // < enter here!
    // ... indents down here :D
}

fn tail_end() -> i32 {
    0i32.wrapping_abs()
        .wrapping_abs()
        .wrapping_abs()
        .wrapping_abs() // < enter here!
        // ... still indents here 🤷
}
```
2023-02-10 20:10:54 +00:00
DropDemBits c7bd3c682f Always reload onEnter configuration
Configuration reload doesn't happen often anyway,
and there will always be a set of onEnter rules to load
2023-02-10 14:55:17 -05:00
Lukas Wirth e6ad8a2edc fix: config substitution failing extension activation 2023-01-25 09:17:49 +01:00
Lukas Wirth ec9476015c Substitute VSCode variables more generally 2023-01-24 13:46:56 +01:00
DropDemBits 992bafa773 Fix change detection for relevant lang config opts 2023-01-17 16:41:33 -05:00
DropDemBits 1c454736a4 Suppress extra indent after the end of dot chains 2023-01-17 15:29:52 -05:00
Alex Veber ddc0147d53 Fix diagnostic code 2023-01-03 08:33:27 +02:00
Lukas Wirth 073a63b93e feat: Allow viewing the full compiler diagnostic in a readonly textview 2022-11-18 19:56:08 +01:00
bors 69f01fdff5 Auto merge of #13451 - Veykril:lang-config, r=Veykril
internal: Properly handle language configuration config changes
2022-10-20 19:15:30 +00:00
Lukas Wirth a8e0a20ce4 internal: Properly handle language configuration config changes 2022-10-20 21:14:36 +02:00
Yotam Ofek e05df93b8e Workaround the python vscode extension's polyfill 2022-10-20 17:56:51 +00:00
Lukas Wirth 8aaafddee8 Properly reload changed configs for server start 2022-10-17 14:53:46 +02:00
Lukas Wirth d5f467aa4a Substitute some VSCode variables in the VSCode client 2022-10-16 19:45:08 +02:00
HKalbasi 58e5452a9b fix formatting 2022-10-12 14:14:59 -07:00
HKalbasi 983ae1b1c9 Cast runnableEnv items to string 2022-10-12 20:40:49 +03:30
bors 55bf51df41 Auto merge of #13087 - Veykril:config-update, r=Veykril
Remove auto-config patching from the VSCode client

This was introduced 4 months ago when we drastically changed the config keys. I'd like to remove this given I always felt uneasy doing edits to a users config from within r-a, and by now most if not all users should've swapped to a new enough version of r-a that should've updated their configs.

The extension will continue to work fine even with the outdated keys afterwards since we still do patching server side as well, and that one we'll have to support for quite some more time (if not until a proper 1.0 release where I assume we can allow ourselves some more user facing breakage)

(There also might've been a small bug in here that prevented users with certain outdated keys to prevent them from enabling certain keys for some reason)
2022-08-26 16:22:57 +00:00
Laurențiu Nicola 10617938b1 Remove unused UpdatesChannel type 2022-08-25 21:33:42 +03:00
Lukas Wirth b19f78b022 Remove auto-config patching from the VSCode client 2022-08-22 17:13:49 +02:00
David Barsky a0b257c9d9 chore: remove unused currentExtensionIsNightly() in config.ts 2022-08-16 13:38:50 -04:00
Lukas Wirth 46d6357994 Add a setting to disable comment continuation in VSCode 2022-08-03 18:22:45 +02:00
Lukas Wirth 002447d6cb fix: Ask the user to reload the vscode window when changing server settings 2022-06-14 11:11:08 +02:00
Hasan Ali 213fe5755c Add restartServerOnConfigChange setting 2022-06-06 08:51:50 +01:00
Hasan Ali 92241d65ae Restart server automatically on settings changes 2022-06-05 21:36:42 +01:00
Lukas Wirth 2a8ea089bf fix: Restart the server instead of reloading the window when config changes 2022-06-05 13:29:08 +02:00
Lukas Wirth 3e25c853cf fix: Fix VSCode config patching incorrectly patching some configs 2022-05-31 13:38:48 +02:00
Jake Heinz b8ee992b57 prettier 2022-05-24 03:11:30 +00:00
Jake Heinz d1aa6d3216 vscode: fix extraEnv handling numeric values 2022-05-24 03:00:29 +00:00
Andrei Listochkin f247090558 prettier run 2022-05-17 18:15:06 +01:00