about summary refs log tree commit diff
path: root/editors/code/src
AgeCommit message (Collapse)AuthorLines
2022-07-13fix: Fix VSCode status bar tooltip not showing the error messagesLukas Wirth-15/+16
2022-07-09Bump vscode-languageclientLaurențiu Nicola-2/+5
2022-07-08Update remaining GitHub URLsJonas Schievink-2/+2
2022-07-06Code: use different schemes for the custom viewsLaurențiu Nicola-10/+20
2022-06-29Ignore the `bin` artifact for `bench` targetsChayim Refael Friedman-1/+1
Just like `test`.
2022-06-15fix: Clear proc-macro changed flag when reloading workspaceLukas Wirth-2/+2
2022-06-14fix: Ask the user to reload the vscode window when changing server settingsLukas Wirth-10/+23
2022-06-06Add restartServerOnConfigChange settingHasan Ali-1/+16
2022-06-05Restart server automatically on settings changesHasan Ali-8/+1
2022-06-05Auto merge of #12472 - Veykril:output-ch, r=Veykrilbors-7/+29
internal: Keep output channels across restarts cc https://github.com/rust-lang/rust-analyzer/pull/12470
2022-06-05internal: Keep output channels across restartsLukas Wirth-7/+29
2022-06-05fix: Restart the server instead of reloading the window when config changesLukas Wirth-1/+1
2022-06-05fix: Cleanup output channels when restarting serverLukas Wirth-0/+2
2022-06-01[editors/vscode] cleaer status bar bg color / command when server status ↵Jake Heinz-0/+2
returns to OK
2022-05-31fix: Fix VSCode config patching incorrectly patching some configsLukas Wirth-4/+4
2022-05-26Fix typoHofer-Julian-1/+1
2022-05-26internal: Use statusBarItem colors for status item in VSCodeLukas Wirth-2/+8
2022-05-24prettierJake Heinz-2/+5
2022-05-24vscode: fix extraEnv handling numeric valuesJake Heinz-2/+3
2022-05-21Fix broken async callback in join linesLaurențiu Nicola-2/+3
2022-05-20Add "cargo clippy" task presetJonas Schievink-0/+1
2022-05-18"Show implementations" link display error fixAndrei Listochkin-3/+48
While VSCode [uses it's own implementation for URIs](https://github.com/microsoft/vscode-uri) which notably doesn't have any limits of URI size, the renderer itself relies on Web platform engine, that limits the length of the URLs and bails out when the attribute length of an `href` inside `a` tag is too long. Command URIs have a form of `command:command-name?arguments`, where `arguments` is a percent-encoded array of data we want to pass along to the command function. For "Show References" this is a list of all file URIs with locations of every reference, and it can get quite long. This PR introduces another intermediary `linkToCommand` command. When we render a command link, a reference to a command with all its arguments is stored in a map, and instead a `linkToCommand` link is rendered with the key to that map. For now the map is cleaned up periodically (I've set it to every 10 minutes). In general case we'll probably need to introduce TTLs or flags to denote ephemeral links (like these in hover popups) and persistent links and clean those separately. But for now simply keeping the last few links in the map should be good enough. Likewise, we could add code to remove a target command from the map after the link is clicked, but assuming most links in hover sheets won't be clicked anyway this code won't change the overall memory use much. Closes #9926
2022-05-17automate braceless return substitution for long linesAndrei Listochkin-2/+4
Per [bjorn3][https://github.com/bjorn3] suggestion resolves cases where an early return is moved to a separate line due to line width formatting. This setting changes ``` if (a very long condition) return; ``` to ``` if (a very long condition) { return; } ``` while keeping ``` if (short) return; ``` as is. In pathological cases this may cause `npm run fix` not to fix formatting in one go and may require running it twice.
2022-05-17prettier runAndrei Listochkin-679/+1006
2022-05-17Fix incorrect config key in client config updateLukas Wirth-1/+1
Closes https://github.com/rust-lang/rust-analyzer/issues/12288
2022-05-13Don't make r-a fail to initialize if updating the config failsLukas Wirth-1/+3
2022-05-13fix: Fix incorrect hover actions config keysLukas Wirth-12/+12
2022-05-13feat: Change VSCode extension publisher to `rust-lang`Lukas Wirth-2/+2
2022-05-12Auto merge of #12215 - ↵bors-3/+127
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-12internal: Rename primeCaches config keysLukas Wirth-1/+2
2022-05-11Enable variable substitutions before passing them over to R-A serverAndrei Listochkin-3/+4
2022-05-11VSCode variables support for substitutionsAndrei Listochkin-1/+54
Tests now open Rust-Analyzer extension code in order to populate VSCode variables.
2022-05-11handle references to external environment variablesAndrei Listochkin-1/+24
use cross-env to enable env variables on Windows
2022-05-11iterative dependency solverAndrei Listochkin-0/+47
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-11fix: Fix incorrect config patching for runBuildScriptsLukas Wirth-3/+3
2022-05-01auto update old configurations to newer onesLukas Wirth-9/+87
2022-04-21Export lc.LanguageClient from VSCode extensionWill Crichton-3/+12
2022-04-20Pass the language id when toggling inlay hintsLaurențiu Nicola-3/+2
2022-04-19Allows triggering commands after an assist editJonas Schievink-0/+3
2022-04-16Remove old inlay hints settingsLaurențiu Nicola-18/+5
2022-04-08Update for languageclient API changesLaurențiu Nicola-11/+11
2022-04-08Switch to LSP inlay hintsLaurențiu Nicola-64/+0
2022-04-03Merge #11821bors[bot]-1/+1
11821: minor: Bump npm deps r=lnicola a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-04-03Load @hpcc-js/wasm as a script, not workerLaurențiu Nicola-1/+1
2022-03-31Add "view file text" command to debug sync issuesJonas Schievink-0/+51
2022-03-16feat: Add return type hints for closures with block bodiesLukas Wirth-1/+3
2022-03-15editors/code: fix crash due to missing ID= fieldVladimir Serov-2/+2
Assuming ID=linux in isNixOs by default. You can get away with default "", but why do that if there's a default value in spec?) Also removed toLowerCase — it really shouldn't be needed. Fixes #11709
2022-03-13editors/code: fix nixos detectionVladimir Serov-1/+2
Problem: NixOS started using quotes around it's id field in /etc/os-release Solution: Parially parsing os-release, and detecting, whether `nixos` appears anywhere in "ID=" field\ See https://github.com/rust-analyzer/rust-analyzer/issues/11695 Closes #11695
2022-03-07Add missing parameterLaurențiu Nicola-1/+2
2022-03-07Update LSP docsLaurențiu Nicola-1/+1