@@ -21,6 +21,7 @@ use pgt_diagnostics::{
21
21
} ;
22
22
use pgt_fs:: { ConfigName , PgTPath } ;
23
23
use pgt_typecheck:: { IdentifierType , TypecheckParams , TypedIdentifier } ;
24
+ use pgt_workspace_macros:: ignored_path;
24
25
use schema_cache_manager:: SchemaCacheManager ;
25
26
use sqlx:: { Executor , PgPool } ;
26
27
use tracing:: { debug, info} ;
@@ -30,7 +31,7 @@ use crate::{
30
31
configuration:: to_analyser_rules,
31
32
features:: {
32
33
code_actions:: {
33
- self , CodeAction , CodeActionKind , CodeActionsResult , CommandAction ,
34
+ CodeAction , CodeActionKind , CodeActionsParams , CodeActionsResult , CommandAction ,
34
35
CommandActionCategory , ExecuteStatementParams , ExecuteStatementResult ,
35
36
} ,
36
37
completions:: { CompletionsResult , GetCompletionsParams , get_statement_for_completions} ,
@@ -262,6 +263,7 @@ impl Workspace for WorkspaceServer {
262
263
}
263
264
264
265
/// Add a new file to the workspace
266
+ #[ ignored_path( path=& params. path) ]
265
267
#[ tracing:: instrument( level = "info" , skip_all, fields( path = params. path. as_path( ) . as_os_str( ) . to_str( ) ) , err) ]
266
268
fn open_file ( & self , params : OpenFileParams ) -> Result < ( ) , WorkspaceError > {
267
269
let mut documents = self . documents . write ( ) . unwrap ( ) ;
@@ -277,6 +279,7 @@ impl Workspace for WorkspaceServer {
277
279
}
278
280
279
281
/// Remove a file from the workspace
282
+ #[ ignored_path( path=& params. path) ]
280
283
fn close_file ( & self , params : super :: CloseFileParams ) -> Result < ( ) , WorkspaceError > {
281
284
let mut documents = self . documents . write ( ) . unwrap ( ) ;
282
285
documents
@@ -291,6 +294,7 @@ impl Workspace for WorkspaceServer {
291
294
path = params. path. as_os_str( ) . to_str( ) ,
292
295
version = params. version
293
296
) , err) ]
297
+ #[ ignored_path( path=& params. path) ]
294
298
fn change_file ( & self , params : super :: ChangeFileParams ) -> Result < ( ) , WorkspaceError > {
295
299
let mut documents = self . documents . write ( ) . unwrap ( ) ;
296
300
@@ -312,6 +316,7 @@ impl Workspace for WorkspaceServer {
312
316
None
313
317
}
314
318
319
+ #[ ignored_path( path=& params. path) ]
315
320
fn get_file_content ( & self , params : GetFileContentParams ) -> Result < String , WorkspaceError > {
316
321
let documents = self . documents . read ( ) . unwrap ( ) ;
317
322
let document = documents
@@ -324,10 +329,11 @@ impl Workspace for WorkspaceServer {
324
329
Ok ( self . is_ignored ( params. pgt_path . as_path ( ) ) )
325
330
}
326
331
332
+ #[ ignored_path( path=& params. path) ]
327
333
fn pull_code_actions (
328
334
& self ,
329
- params : code_actions :: CodeActionsParams ,
330
- ) -> Result < code_actions :: CodeActionsResult , WorkspaceError > {
335
+ params : CodeActionsParams ,
336
+ ) -> Result < CodeActionsResult , WorkspaceError > {
331
337
let documents = self . documents . read ( ) . unwrap ( ) ;
332
338
let parser = documents
333
339
. get ( & params. path )
@@ -366,6 +372,7 @@ impl Workspace for WorkspaceServer {
366
372
Ok ( CodeActionsResult { actions } )
367
373
}
368
374
375
+ #[ ignored_path( path=& params. path) ]
369
376
fn execute_statement (
370
377
& self ,
371
378
params : ExecuteStatementParams ,
@@ -409,6 +416,7 @@ impl Workspace for WorkspaceServer {
409
416
} )
410
417
}
411
418
419
+ #[ ignored_path( path=& params. path) ]
412
420
fn pull_diagnostics (
413
421
& self ,
414
422
params : PullDiagnosticsParams ,
@@ -607,6 +615,7 @@ impl Workspace for WorkspaceServer {
607
615
} )
608
616
}
609
617
618
+ #[ ignored_path( path=& params. path) ]
610
619
#[ tracing:: instrument( level = "debug" , skip_all, fields(
611
620
path = params. path. as_os_str( ) . to_str( ) ,
612
621
position = params. position. to_string( )
0 commit comments