File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
crates/oxc_language_server/src Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ impl LanguageServer for Backend {
566566 } ;
567567
568568 self . file_system . write ( ) . await . remove ( uri) ;
569- worker. remove_diagnostics ( & params. text_document . uri ) . await ;
569+ worker. remove_uri_cache ( & params. text_document . uri ) . await ;
570570 }
571571
572572 /// It will return code actions or commands for the given range.
Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ impl Tool for ServerLinter {
525525 self . run_diagnostic ( uri, content)
526526 }
527527
528- fn remove_diagnostics ( & self , uri : & Uri ) {
528+ fn remove_uri_cache ( & self , uri : & Uri ) {
529529 self . code_actions . pin ( ) . remove ( uri) ;
530530 }
531531}
Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ pub trait Tool: Send + Sync {
114114 None
115115 }
116116
117- /// Remove diagnostics associated with the given URI.
118- fn remove_diagnostics ( & self , _uri : & Uri ) {
117+ /// Remove internal cache for the given URI, if any .
118+ fn remove_uri_cache ( & self , _uri : & Uri ) {
119119 // Default implementation does nothing.
120120 }
121121
Original file line number Diff line number Diff line change @@ -94,10 +94,10 @@ impl WorkspaceWorker {
9494 self . options . lock ( ) . await . is_none ( )
9595 }
9696
97- /// Remove all diagnostics for the given URI
98- pub async fn remove_diagnostics ( & self , uri : & Uri ) {
97+ /// Remove all internal cache for the given URI, if any.
98+ pub async fn remove_uri_cache ( & self , uri : & Uri ) {
9999 self . tools . read ( ) . await . iter ( ) . for_each ( |tool| {
100- tool. remove_diagnostics ( uri) ;
100+ tool. remove_uri_cache ( uri) ;
101101 } ) ;
102102 }
103103
You can’t perform that action at this time.
0 commit comments