File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use std::{collections::HashSet, sync::Arc};
3
3
use pg_base_db:: { Change , DocumentChange } ;
4
4
use pg_commands:: { Command , ExecuteStatementCommand } ;
5
5
use pg_completions:: CompletionParams ;
6
- use pg_diagnostics :: Diagnostic ;
6
+ use pg_workspace :: diagnostics :: Diagnostic ;
7
7
use pg_fs:: PgLspPath ;
8
8
use pg_hover:: HoverParams ;
9
9
use pg_workspace:: Workspace ;
Original file line number Diff line number Diff line change 1
- use pg_diagnostics :: Diagnostic ;
1
+ use pg_workspace :: diagnostics :: { Diagnostic , Severity } ;
2
2
use tower_lsp:: lsp_types;
3
3
4
4
pub fn diagnostic ( diagnostic : Diagnostic , range : lsp_types:: Range ) -> lsp_types:: Diagnostic {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ mod typecheck;
6
6
7
7
use std:: sync:: { RwLock , RwLockWriteGuard } ;
8
8
9
+ use diagnostics:: { Diagnostic , Severity } ;
9
10
use dashmap:: { DashMap , DashSet } ;
10
11
use lint:: Linter ;
11
12
use pg_base_db:: { Document , DocumentChange , StatementRef } ;
@@ -98,10 +99,10 @@ impl Workspace {
98
99
}
99
100
100
101
/// Collects all diagnostics for a given document. It does not compute them, it just collects.
101
- pub fn diagnostics ( & self , url : & PgLspPath ) -> Vec < pg_diagnostics :: Diagnostic > {
102
- let mut diagnostics: Vec < pg_diagnostics :: Diagnostic > = vec ! [ ] ;
102
+ pub fn diagnostics ( & self , url : & PgLspPath ) -> Vec < crate :: Diagnostic > {
103
+ let mut diagnostics: Vec < crate :: Diagnostic > = vec ! [ ] ;
103
104
104
- let doc = self . documents . get ( & url) ;
105
+ let doc = self . documents . get ( url) ;
105
106
106
107
if doc. is_none ( ) {
107
108
return diagnostics;
You can’t perform that action at this time.
0 commit comments