Skip to content

Commit 856dc29

Browse files
committed
progress
1 parent 1b884f2 commit 856dc29

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

crates/pgt_lsp/tests/server.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
use anyhow::bail;
21
use anyhow::Context;
32
use anyhow::Error;
43
use anyhow::Result;
4+
use anyhow::bail;
55
use biome_deserialize::Merge;
66
use biome_deserialize::StringSet;
7-
use futures::channel::mpsc::{channel, Sender};
87
use futures::Sink;
98
use futures::SinkExt;
109
use futures::Stream;
1110
use futures::StreamExt;
12-
use pgt_configuration::database::PartialDatabaseConfiguration;
11+
use futures::channel::mpsc::{Sender, channel};
1312
use pgt_configuration::PartialConfiguration;
13+
use pgt_configuration::database::PartialDatabaseConfiguration;
1414
use pgt_fs::MemoryFileSystem;
1515
use pgt_lsp::LSPServer;
1616
use pgt_lsp::ServerFactory;
1717
use pgt_test_utils::test_database::get_new_test_db;
1818
use pgt_workspace::DynRef;
19-
use serde::de::DeserializeOwned;
2019
use serde::Serialize;
20+
use serde::de::DeserializeOwned;
2121
use serde_json::Value;
2222
use serde_json::{from_value, to_value};
2323
use sqlx::Executor;
2424
use std::any::type_name;
2525
use std::fmt::Display;
26+
use std::path::Path;
2627
use std::time::Duration;
2728
use tower::timeout::Timeout;
2829
use tower::{Service, ServiceExt};
30+
use tower_lsp::LspService;
2931
use tower_lsp::jsonrpc;
3032
use tower_lsp::jsonrpc::Response;
3133
use tower_lsp::lsp_types as lsp;
@@ -47,7 +49,6 @@ use tower_lsp::lsp_types::{
4749
PublishDiagnosticsParams, TextDocumentContentChangeEvent, TextDocumentIdentifier,
4850
TextDocumentItem, Url, VersionedTextDocumentIdentifier,
4951
};
50-
use tower_lsp::LspService;
5152
use tower_lsp::{jsonrpc::Request, lsp_types::InitializeParams};
5253

5354
/// Statically build an [Url] instance that points to the file at `$path`
@@ -1395,6 +1396,7 @@ async fn extends_config() -> Result<()> {
13951396
conf_without_db.merge_with(PartialConfiguration {
13961397
extends: Some(StringSet::from_iter([Path::new("..")
13971398
.join("postgrestools.jsonc")
1399+
.to_string_lossy()
13981400
.to_string()])),
13991401
..Default::default()
14001402
});

crates/pgt_workspace/src/workspace/server.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ use async_helper::run_async;
1010
use connection_manager::ConnectionManager;
1111
use dashmap::DashMap;
1212
use document::Document;
13-
use futures::{stream, StreamExt};
13+
use futures::{StreamExt, stream};
1414
use parsed_document::{
1515
AsyncDiagnosticsMapper, CursorPositionFilter, DefaultMapper, ExecuteStatementMapper,
1616
ParsedDocument, SyncDiagnosticsMapper,
1717
};
1818
use pgt_analyse::{AnalyserOptions, AnalysisFilter};
1919
use pgt_analyser::{Analyser, AnalyserConfig, AnalyserContext};
2020
use pgt_diagnostics::{
21-
serde::Diagnostic as SDiagnostic, Diagnostic, DiagnosticExt, Error, Severity,
21+
Diagnostic, DiagnosticExt, Error, Severity, serde::Diagnostic as SDiagnostic,
2222
};
2323
use pgt_fs::{ConfigName, PgTPath};
2424
use pgt_typecheck::{IdentifierType, TypecheckParams, TypedIdentifier};
@@ -27,17 +27,17 @@ use sqlx::{Executor, PgPool};
2727
use tracing::{debug, info};
2828

2929
use crate::{
30+
WorkspaceError,
3031
configuration::to_analyser_rules,
3132
features::{
3233
code_actions::{
3334
self, CodeAction, CodeActionKind, CodeActionsResult, CommandAction,
3435
CommandActionCategory, ExecuteStatementParams, ExecuteStatementResult,
3536
},
36-
completions::{get_statement_for_completions, CompletionsResult, GetCompletionsParams},
37+
completions::{CompletionsResult, GetCompletionsParams, get_statement_for_completions},
3738
diagnostics::{PullDiagnosticsParams, PullDiagnosticsResult},
3839
},
3940
settings::{WorkspaceSettings, WorkspaceSettingsHandle, WorkspaceSettingsHandleMut},
40-
WorkspaceError,
4141
};
4242

4343
use super::{

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ quick-create branch commit:
141141
gh pr create --fill
142142

143143
quick-modify:
144+
just format
144145
git add -A
145146
git commit -m "progress"
146147
git push

0 commit comments

Comments
 (0)