mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-21 19:04:24 +00:00
Less rust-analyzer specific onEnter
This commit is contained in:
parent
e4f91bfa57
commit
76e170c3d0
11 changed files with 105 additions and 55 deletions
|
@ -8,7 +8,10 @@ export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) {
|
|||
|
||||
const editor = vscode.window.visibleTextEditors.find((it) => it.document.uri.toString() === uri.toString());
|
||||
if (!editor) return;
|
||||
await applySnippetTextEdits(editor, edits);
|
||||
}
|
||||
|
||||
export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vscode.TextEdit[]) {
|
||||
let selection: vscode.Selection | undefined = undefined;
|
||||
let lineDelta = 0;
|
||||
await editor.edit((builder) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue