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
This commit is contained in:
bors 2024-06-19 08:39:42 +00:00
commit 87ee18da54
5 changed files with 25 additions and 2 deletions

View file

@ -177,6 +177,7 @@ function createCommands(): Record<string, CommandFactory> {
serverVersion: { enabled: commands.serverVersion },
viewMemoryLayout: { enabled: commands.viewMemoryLayout },
toggleCheckOnSave: { enabled: commands.toggleCheckOnSave },
toggleLSPLogs: { enabled: commands.toggleLSPLogs },
// Internal commands which are invoked by the server.
applyActionGroup: { enabled: commands.applyActionGroup },
applySnippetWorkspaceEdit: { enabled: commands.applySnippetWorkspaceEditCommand },