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};
33use pg_base_db:: { Change , DocumentChange } ;
44use pg_commands:: { Command , ExecuteStatementCommand } ;
55use pg_completions:: CompletionParams ;
6- use pg_diagnostics :: Diagnostic ;
6+ use pg_workspace :: diagnostics :: Diagnostic ;
77use pg_fs:: PgLspPath ;
88use pg_hover:: HoverParams ;
99use 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 } ;
22use tower_lsp:: lsp_types;
33
44pub 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;
66
77use std:: sync:: { RwLock , RwLockWriteGuard } ;
88
9+ use diagnostics:: { Diagnostic , Severity } ;
910use dashmap:: { DashMap , DashSet } ;
1011use lint:: Linter ;
1112use pg_base_db:: { Document , DocumentChange , StatementRef } ;
@@ -98,10 +99,10 @@ impl Workspace {
9899 }
99100
100101 /// 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 ! [ ] ;
103104
104- let doc = self . documents . get ( & url) ;
105+ let doc = self . documents . get ( url) ;
105106
106107 if doc. is_none ( ) {
107108 return diagnostics;
You can’t perform that action at this time.
0 commit comments