import type * as lspTypes from "vscode-languageserver-protocol" ; import { lspRangeToRange } from "./lspNovaConversions" ; export async function applyLSPEdits ( editor , edits ) { editor . edit ( ( textEditorEdit ) => { for ( const change of edits . reverse ( ) ) { const range = lspRangeToRange ( editor . document , change . range ) ; textEditorEdit . replace ( range , change . newText ) ; } } ) ; }