mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Add a command to clear flycheck diagnostics
This commit is contained in:
parent
d8ddde27f9
commit
cf8d89e46b
7 changed files with 64 additions and 2 deletions
|
@ -792,6 +792,12 @@ export function cancelFlycheck(ctx: CtxInit): Cmd {
|
|||
};
|
||||
}
|
||||
|
||||
export function clearFlycheck(ctx: CtxInit): Cmd {
|
||||
return async () => {
|
||||
await ctx.client.sendNotification(ra.clearFlycheck);
|
||||
};
|
||||
}
|
||||
|
||||
export function runFlycheck(ctx: CtxInit): Cmd {
|
||||
return async () => {
|
||||
const editor = ctx.activeRustEditor;
|
||||
|
|
|
@ -80,7 +80,7 @@ export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, Te
|
|||
);
|
||||
|
||||
export const cancelFlycheck = new lc.NotificationType0("rust-analyzer/cancelFlycheck");
|
||||
|
||||
export const clearFlycheck = new lc.NotificationType0("rust-analyzer/clearFlycheck");
|
||||
export const runFlycheck = new lc.NotificationType<{
|
||||
textDocument: lc.TextDocumentIdentifier | null;
|
||||
}>("rust-analyzer/runFlycheck");
|
||||
|
|
|
@ -150,6 +150,7 @@ function createCommands(): Record<string, CommandFactory> {
|
|||
moveItemUp: { enabled: commands.moveItemUp },
|
||||
moveItemDown: { enabled: commands.moveItemDown },
|
||||
cancelFlycheck: { enabled: commands.cancelFlycheck },
|
||||
clearFlycheck: { enabled: commands.clearFlycheck },
|
||||
runFlycheck: { enabled: commands.runFlycheck },
|
||||
ssr: { enabled: commands.ssr },
|
||||
serverVersion: { enabled: commands.serverVersion },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue