vscode extension: make sure the "Slint LSP" output always exist

It is used to show the output of `debug()`.
User don't find this output if it doesn't exist before there is any
debug output. So make sure it always exist.

(Note: this is not for the browser version, since then we use
console.log instead of the "Slint LSP" output from stderr)
This commit is contained in:
Olivier Goffart 2024-08-23 11:04:24 +02:00
parent 9650aa0aae
commit ffd0477cd7

View file

@ -141,6 +141,9 @@ function startClient(
// Add setup common between native and wasm LSP to common.setup_client_handle!
client.add_updater((cl) => {
// Just make sure that the output channel is always present.
cl?.outputChannel.append("");
cl?.onNotification(common.serverStatus, (params: any) =>
common.setServerStatus(params, statusBar),
);