Commit Graph

192 Commits

Author SHA1 Message Date
Laurențiu Nicola d1d111d09e Merge commit '3b7c7f97e4a7bb253a8d398ee4f8346f6cf2817b' into sync-from-ra 2023-11-08 08:15:03 +02:00
Laurențiu Nicola bcfc997eac Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-ra 2023-09-18 12:33:49 +03:00
Laurențiu Nicola 30d8aa1bec Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-ra 2023-08-21 12:44:09 +03:00
Laurențiu Nicola aa55ce9567 Merge commit 'baee6b338b0ea076cd7a9f18d47f175dd2ba0e5d' into sync-from-ra 2023-08-07 12:03:15 +03:00
Laurențiu Nicola 4704881b64 Merge commit '37f84c101bca43b11027f30ab0c2852f9325bc3d' into sync-from-ra 2023-07-17 16:49:15 +03:00
Laurențiu Nicola c48062fe2a Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra 2023-06-05 12:04:23 +03:00
Laurențiu Nicola dbf04a5ee2 ⬆️ rust-analyzer 2023-03-20 08:31:01 +02:00
Laurențiu Nicola bc45c7659a ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
arcnmx 25242fe93f ⬆️ rust-analyzer
Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'
2023-01-09 10:36:22 -08:00
Laurențiu Nicola a2a1d99545 ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
Laurențiu Nicola 8807fc4cc3 ⬆️ rust-analyzer 2022-10-26 17:40:41 +03:00
Laurențiu Nicola a99a48e786 ⬆️ rust-analyzer 2022-10-18 09:12:49 +03:00
Laurențiu Nicola 3e358a6827 ⬆️ rust-analyzer 2022-08-30 14:51:24 +03:00
Laurențiu Nicola 31519bb394 ⬆️ rust-analyzer 2022-08-23 10:05:52 +03:00
Laurențiu Nicola 22c8c9c401 ⬆️ rust-analyzer 2022-08-09 07:23:57 +03: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
Lukas Wirth d43b9dae56 Fix incorrect config key in client config update
Closes https://github.com/rust-lang/rust-analyzer/issues/12288
2022-05-17 14:56:08 +02:00
Lukas Wirth 8ac429dad9 fix: Fix incorrect hover actions config keys 2022-05-13 21:17:03 +02:00
Lukas Wirth e47f4597d4 feat: Change VSCode extension publisher to rust-lang 2022-05-13 13:21:52 +02:00
bors 927ef0ce7e Auto merge of #12215 - listochkin:Support-variable-substitution-in-vscode-settings, r=Veykril
feat: Support variable substitution in VSCode settings

Currently support a subset of [variables provided by VSCode](https://code.visualstudio.com/docs/editor/variables-reference) in `server.extraEnv` section of Rust-Analyzer settings:

  * `workspaceFolder`
  * `workspaceFolderBasename`
  * `cwd`
  * `execPath`
  * `pathSeparator`

Also, this PR adds support for general environment variables resolution. You can declare environment variables and reference them from other variables like this:

```JSON
"rust-analyzer.server.extraEnv": {
    "RUSTFLAGS": "-L${env:OPEN_XR_SDK_PATH}",
    "OPEN_XR_SDK_PATH": "${workspaceFolder}\\..\\OpenXR-SDK\\build\\src\\loader\\Release"
},
```
The order of variable declaration doesn't matter, you can reference variables before defining them. If the variable is not present in `extraEnv` section, VSCode will search for them in your environment. Missing variables will be replaced with empty string. Circular references won't be resolved and will be passed to rust-analyzer server process as is.

Closes #9626, but doesn't address use cases where people want to use values provided by `rustc` or `cargo`, such as `${targetTriple}` proposal #11649
2022-05-12 11:05:21 +00:00
Lukas Wirth 84176f6b24 internal: Rename primeCaches config keys 2022-05-12 12:30:00 +02:00
Andrei Listochkin 684fa2794f VSCode variables support for substitutions
Tests now open Rust-Analyzer extension code in order to populate
VSCode variables.
2022-05-11 15:50:59 +01:00
Andrei Listochkin 6c769ac00d handle references to external environment variables
use cross-env to enable env variables on Windows
2022-05-11 15:50:25 +01:00
Andrei Listochkin a86db5d0d1 iterative dependency solver
First, we go through every environment variable key and record all cases
where there are reference to other variables / dependencies.

We track two sets of variables - resolved and yet-to-be-resolved.
We pass over a list of variables over and over again and when all
variable's dependencies were resolved during previous passes we perform
a replacement for that variable, too.

Over time the size of `toResolve` set should go down to zero, however
circular dependencies may prevent that. We track the size of `toResolve`
between iterations to avoid infinite looping.

At the end we produce an object of the same size and shape as
the original, but with the values replace with resolved versions.
2022-05-11 15:05:41 +01:00
Lukas Wirth e68352a9f5 fix: Fix incorrect config patching for runBuildScripts 2022-05-11 12:38:21 +02:00
Lukas Wirth d6dba1c97c auto update old configurations to newer ones 2022-05-01 19:57:09 +02:00
Laurențiu Nicola f77adb3a23 Remove old inlay hints settings 2022-04-16 08:05:07 +03:00
Lukas Wirth bd17933c31 feat: Add return type hints for closures with block bodies 2022-03-16 21:25:03 +01:00
Laurențiu Nicola e97569c998 Drop extensionUri copy 2021-12-23 09:36:55 +02:00
Laurențiu Nicola f63690c058 Remove proxy settings 2021-12-23 09:23:56 +02:00
Laurențiu Nicola 650ec14e4f Remove channel and ask before download prefs 2021-12-23 09:23:56 +02:00
Laurențiu Nicola 262a698875 Prepare Code extension for bundling 2021-12-18 17:44:16 +02:00
Laurențiu Nicola 157056db22 Fix proxyStrictSSL check 2021-12-02 15:46:23 +02:00
Laurențiu Nicola 7d815b862f Refactor proxy settings 2021-11-28 10:54:35 +02:00
Laurențiu Nicola 2f5149886d Respect http.proxyStrictSSL 2021-11-27 07:29:44 +02:00
Jake Heinz d3d768de0d inlay hints: add the option to always show constructor inlay hints 2021-11-13 23:12:29 +00:00
Lukas Wirth 4c582ffe9f Don't ask the user to reload when chaning HoverAction configs in VSCode 2021-10-25 14:48:36 +02:00
Kevin DeLorey 5b9f173254 Removed all dead config accessors. 2021-07-23 07:50:37 -06:00
Kevin DeLorey d8f0213316 removed dead code 2021-07-23 07:41:55 -06:00
Kevin DeLorey b75e0e7bb1 Initial commit of highlight related configuration w/ implementation. 2021-07-22 19:35:47 -06:00
bors[bot] 388a91c8a8 Merge #8951
8951: internal: migrate to vscode.FileSystem API r=matklad a=wxb1ank

I encountered an error where `bootstrap()` attempts to create a directory with the path `C:\C:\...`. I couldn't find this reported anywhere else. Using the `vscode.FileSystem` API instead of the `fs` one works here. I assume the latter automatically prepends `C:\` to paths whereas the former does not. I don't know if this suggests `vscode.FileSystem` should be used in more places for consistency.

Co-authored-by: wxb1ank <wxblank@gmail.com>
2021-06-14 10:30:10 +00:00
Lukas Wirth 07394316ff Add function references hover action 2021-06-04 15:54:55 +02:00
wxb1ank 3ca7f61a8d internal: use vscode.FileSystem API in main.ts 2021-06-02 12:07:13 -04:00