File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use super::tsc;
1010use super :: urls:: url_to_uri;
1111
1212use crate :: args:: jsr_url;
13+ use crate :: lsp:: logging:: lsp_warn;
1314use crate :: lsp:: search:: PackageSearchApi ;
1415use crate :: tools:: lint:: CliLinter ;
1516use crate :: util:: path:: relative_specifier;
@@ -747,8 +748,14 @@ pub fn ts_changes_to_edit(
747748) -> Result < Option < lsp:: WorkspaceEdit > , AnyError > {
748749 let mut text_document_edits = Vec :: new ( ) ;
749750 for change in changes {
750- let text_document_edit = change. to_text_document_edit ( language_server) ?;
751- text_document_edits. push ( text_document_edit) ;
751+ let edit = match change. to_text_document_edit ( language_server) {
752+ Ok ( e) => e,
753+ Err ( err) => {
754+ lsp_warn ! ( "Couldn't covert text document edit: {:#}" , err) ;
755+ continue ;
756+ }
757+ } ;
758+ text_document_edits. push ( edit) ;
752759 }
753760 Ok ( Some ( lsp:: WorkspaceEdit {
754761 changes : None ,
You can’t perform that action at this time.
0 commit comments