mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
npm fix run
This commit is contained in:
parent
eb931c0d9e
commit
2a1cb52c99
4 changed files with 16 additions and 9 deletions
|
@ -10,7 +10,9 @@ export interface SourceChange {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function handle(change: SourceChange) {
|
export async function handle(change: SourceChange) {
|
||||||
const wsEdit = Server.client.protocol2CodeConverter.asWorkspaceEdit(change.workspaceEdit);
|
const wsEdit = Server.client.protocol2CodeConverter.asWorkspaceEdit(
|
||||||
|
change.workspaceEdit
|
||||||
|
);
|
||||||
let created;
|
let created;
|
||||||
let moved;
|
let moved;
|
||||||
if (change.workspaceEdit.documentChanges) {
|
if (change.workspaceEdit.documentChanges) {
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
SourceChange
|
SourceChange
|
||||||
} from './apply_source_change';
|
} from './apply_source_change';
|
||||||
|
|
||||||
|
|
||||||
export async function handle(event: { text: string }): Promise<boolean> {
|
export async function handle(event: { text: string }): Promise<boolean> {
|
||||||
const editor = vscode.window.activeTextEditor;
|
const editor = vscode.window.activeTextEditor;
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -48,7 +48,11 @@ function createTask(spec: Runnable): vscode.Task {
|
||||||
cwd: '.',
|
cwd: '.',
|
||||||
env: definition.env
|
env: definition.env
|
||||||
};
|
};
|
||||||
const exec = new vscode.ShellExecution(definition.command, definition.args, execOption);
|
const exec = new vscode.ShellExecution(
|
||||||
|
definition.command,
|
||||||
|
definition.args,
|
||||||
|
execOption
|
||||||
|
);
|
||||||
|
|
||||||
const f = vscode.workspace.workspaceFolders![0];
|
const f = vscode.workspace.workspaceFolders![0];
|
||||||
const t = new vscode.Task(
|
const t = new vscode.Task(
|
||||||
|
@ -59,7 +63,7 @@ function createTask(spec: Runnable): vscode.Task {
|
||||||
exec,
|
exec,
|
||||||
['$rustc']
|
['$rustc']
|
||||||
);
|
);
|
||||||
t.presentationOptions.clear = true
|
t.presentationOptions.clear = true;
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +118,7 @@ export async function handleSingle(runnable: Runnable) {
|
||||||
task.group = vscode.TaskGroup.Build;
|
task.group = vscode.TaskGroup.Build;
|
||||||
task.presentationOptions = {
|
task.presentationOptions = {
|
||||||
reveal: vscode.TaskRevealKind.Always,
|
reveal: vscode.TaskRevealKind.Always,
|
||||||
panel: vscode.TaskPanelKind.Dedicated,
|
panel: vscode.TaskPanelKind.Dedicated
|
||||||
};
|
};
|
||||||
|
|
||||||
return vscode.tasks.executeTask(task);
|
return vscode.tasks.executeTask(task);
|
||||||
|
|
|
@ -37,8 +37,10 @@ export function activate(context: vscode.ExtensionContext) {
|
||||||
return await original(...args);
|
return await original(...args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch(_) {
|
} catch (_) {
|
||||||
vscode.window.showWarningMessage('Enhanced typing feature is disabled because of incompatibility with VIM extension');
|
vscode.window.showWarningMessage(
|
||||||
|
'Enhanced typing feature is disabled because of incompatibility with VIM extension'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue