File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -574,6 +574,9 @@ impl LanguageServerHandling for MinecraftShaderLanguageServer {
574574 fn did_open_text_document ( & mut self , params : DidOpenTextDocumentParams ) {
575575 //eprintln!("opened doc {}", params.text_document.uri);
576576 let path = PathBuf :: from_url ( params. text_document . uri ) ;
577+ if !path. starts_with ( & self . root ) {
578+ return
579+ }
577580 if self . graph . borrow_mut ( ) . find_node ( & path) == None {
578581 self . add_file_and_includes_to_graph ( & path) ;
579582 }
@@ -588,9 +591,12 @@ impl LanguageServerHandling for MinecraftShaderLanguageServer {
588591 fn did_close_text_document ( & mut self , _: DidCloseTextDocumentParams ) { }
589592
590593 fn did_save_text_document ( & mut self , params : DidSaveTextDocumentParams ) {
591- eprintln ! ( "saved doc {}" , params. text_document. uri) ;
594+ // eprintln!("saved doc {}", params.text_document.uri);
592595
593596 let path = PathBuf :: from_url ( params. text_document . uri ) ;
597+ if !path. starts_with ( & self . root ) {
598+ return
599+ }
594600 self . update_includes ( & path) ;
595601
596602 match self . lint ( & path) {
You can’t perform that action at this time.
0 commit comments