@@ -21,6 +21,7 @@ use pgt_diagnostics::{
2121} ;
2222use pgt_fs:: { ConfigName , PgTPath } ;
2323use pgt_typecheck:: { IdentifierType , TypecheckParams , TypedIdentifier } ;
24+ use pgt_workspace_macros:: ignored_path;
2425use schema_cache_manager:: SchemaCacheManager ;
2526use sqlx:: { Executor , PgPool } ;
2627use tracing:: { debug, info} ;
@@ -30,7 +31,7 @@ use crate::{
3031 configuration:: to_analyser_rules,
3132 features:: {
3233 code_actions:: {
33- self , CodeAction , CodeActionKind , CodeActionsResult , CommandAction ,
34+ CodeAction , CodeActionKind , CodeActionsParams , CodeActionsResult , CommandAction ,
3435 CommandActionCategory , ExecuteStatementParams , ExecuteStatementResult ,
3536 } ,
3637 completions:: { CompletionsResult , GetCompletionsParams , get_statement_for_completions} ,
@@ -262,6 +263,7 @@ impl Workspace for WorkspaceServer {
262263 }
263264
264265 /// Add a new file to the workspace
266+ #[ ignored_path( path=& params. path) ]
265267 #[ tracing:: instrument( level = "info" , skip_all, fields( path = params. path. as_path( ) . as_os_str( ) . to_str( ) ) , err) ]
266268 fn open_file ( & self , params : OpenFileParams ) -> Result < ( ) , WorkspaceError > {
267269 let mut documents = self . documents . write ( ) . unwrap ( ) ;
@@ -277,6 +279,7 @@ impl Workspace for WorkspaceServer {
277279 }
278280
279281 /// Remove a file from the workspace
282+ #[ ignored_path( path=& params. path) ]
280283 fn close_file ( & self , params : super :: CloseFileParams ) -> Result < ( ) , WorkspaceError > {
281284 let mut documents = self . documents . write ( ) . unwrap ( ) ;
282285 documents
@@ -291,6 +294,7 @@ impl Workspace for WorkspaceServer {
291294 path = params. path. as_os_str( ) . to_str( ) ,
292295 version = params. version
293296 ) , err) ]
297+ #[ ignored_path( path=& params. path) ]
294298 fn change_file ( & self , params : super :: ChangeFileParams ) -> Result < ( ) , WorkspaceError > {
295299 let mut documents = self . documents . write ( ) . unwrap ( ) ;
296300
@@ -312,6 +316,7 @@ impl Workspace for WorkspaceServer {
312316 None
313317 }
314318
319+ #[ ignored_path( path=& params. path) ]
315320 fn get_file_content ( & self , params : GetFileContentParams ) -> Result < String , WorkspaceError > {
316321 let documents = self . documents . read ( ) . unwrap ( ) ;
317322 let document = documents
@@ -324,10 +329,11 @@ impl Workspace for WorkspaceServer {
324329 Ok ( self . is_ignored ( params. pgt_path . as_path ( ) ) )
325330 }
326331
332+ #[ ignored_path( path=& params. path) ]
327333 fn pull_code_actions (
328334 & self ,
329- params : code_actions :: CodeActionsParams ,
330- ) -> Result < code_actions :: CodeActionsResult , WorkspaceError > {
335+ params : CodeActionsParams ,
336+ ) -> Result < CodeActionsResult , WorkspaceError > {
331337 let documents = self . documents . read ( ) . unwrap ( ) ;
332338 let parser = documents
333339 . get ( & params. path )
@@ -366,6 +372,7 @@ impl Workspace for WorkspaceServer {
366372 Ok ( CodeActionsResult { actions } )
367373 }
368374
375+ #[ ignored_path( path=& params. path) ]
369376 fn execute_statement (
370377 & self ,
371378 params : ExecuteStatementParams ,
@@ -409,6 +416,7 @@ impl Workspace for WorkspaceServer {
409416 } )
410417 }
411418
419+ #[ ignored_path( path=& params. path) ]
412420 fn pull_diagnostics (
413421 & self ,
414422 params : PullDiagnosticsParams ,
@@ -607,6 +615,7 @@ impl Workspace for WorkspaceServer {
607615 } )
608616 }
609617
618+ #[ ignored_path( path=& params. path) ]
610619 #[ tracing:: instrument( level = "debug" , skip_all, fields(
611620 path = params. path. as_os_str( ) . to_str( ) ,
612621 position = params. position. to_string( )
0 commit comments