rust-analyzer/editors/code/src
bors c27fc0c945 Auto merge of #15896 - minestarks:run-quickpick, r=Veykril
Show placeholder while run command gets runnables from server

This PR fixes a UI annoyance in the VS Code extension when working in large codebases where rust-analyzer can take a few moments to interact with the server. Scenario:

1. Invoke "rust-analyzer: Run" from the command palette or hotkey
2. Quickly start typing to filter the list (or press Enter to accept the last runnable)

We often do this quickly from muscle memory without waiting to see the picker. The picker often takes several seconds to come up, causing us to type garbage into the currently open editor.

Fix:

Show a placeholder item before we call out to the server.

![image](https://github.com/rust-lang/rust-analyzer/assets/16928427/09de6a1c-6f3c-4d29-8031-ba4baeb43282)

Selecting this item does nothing so if the user accidentally hits Enter nothing happens.

The list is populated and the placeholder dismissed when the actual runnables are retrieved. From here the behavior is the same as before.

![image](https://github.com/rust-lang/rust-analyzer/assets/16928427/837c7dfc-c060-4d68-bbf6-df8aa3101b78)
2023-12-08 10:00:37 +00:00
..
ast_inspector.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
bootstrap.ts Pass server extraEnv to isValidExecutable 2023-08-12 07:10:20 +02:00
client.ts add configuration option 2023-11-07 16:33:45 +01:00
commands.ts code: expose workspaces to other extensions; remove addProject command 2023-11-16 12:38:15 -05:00
config.ts Add config for the default click action of extension status bar 2023-10-04 21:07:50 +05:30
ctx.ts code: expose workspaces to other extensions; remove addProject command 2023-11-16 12:38:15 -05:00
debug.ts Debug use cargo workspace root as cwd. fixes #13022 2023-11-30 19:21:59 +08:00
dependencies_provider.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
diagnostics.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
lang_client.ts detect internal error via error.code instead of error message 2023-11-15 12:36:08 +01:00
lsp_ext.ts Add command for only opening external docs and attempt to fix vscode-remote issue 2023-10-18 14:06:07 +02:00
main.ts code: expose workspaces to other extensions; remove addProject command 2023-11-16 12:38:15 -05:00
nullable.ts editor/code: Enable noUncheckedIndexedAccess ts option 2023-07-06 16:17:02 +09:00
persistent_state.ts editor/code: Sort the style to import types 2023-07-11 06:12:00 +09:00
run.ts Show placeholder while run command gets runnables from server 2023-11-14 14:39:17 -08:00
rust_project.ts fmt 2023-03-13 13:30:19 -04:00
snippets.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
tasks.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
toolchain.ts Fix runnable cwd on Windows 2023-12-05 13:09:01 +02:00
undefinable.ts editor/code: Enable noUncheckedIndexedAccess ts option 2023-07-06 16:17:02 +09:00
util.ts code: yeet rust-analyzer.discoverProjectCommand 2023-09-05 12:38:33 -04:00