Add a 'open server logs' button to the error notification
This commit is contained in:
@@ -316,6 +316,7 @@ class ExperimentalFeatures implements lc.StaticFeature {
|
||||
caps.hoverActions = true;
|
||||
caps.serverStatusNotification = true;
|
||||
caps.colorDiagnosticOutput = true;
|
||||
caps.openServerLogs = true;
|
||||
caps.commands = {
|
||||
commands: [
|
||||
"rust-analyzer.runSingle",
|
||||
|
||||
@@ -187,6 +187,11 @@ export class Ctx {
|
||||
this.setServerStatus(params)
|
||||
)
|
||||
);
|
||||
this.pushClientCleanup(
|
||||
this._client.onNotification(ra.openServerLogs, () => {
|
||||
this.outputChannel!.show();
|
||||
})
|
||||
);
|
||||
}
|
||||
return this._client;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ export interface ServerStatusParams {
|
||||
export const serverStatus = new lc.NotificationType<ServerStatusParams>(
|
||||
"experimental/serverStatus"
|
||||
);
|
||||
export const openServerLogs = new lc.NotificationType0("rust-analyzer/openServerLogs");
|
||||
|
||||
export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user