Skip to content

Commit 1b884f2

Browse files
committed
progress
1 parent 8107e5a commit 1b884f2

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

crates/pgt_lsp/tests/server.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1+
use anyhow::bail;
12
use anyhow::Context;
23
use anyhow::Error;
34
use anyhow::Result;
4-
use anyhow::bail;
55
use biome_deserialize::Merge;
66
use biome_deserialize::StringSet;
7+
use futures::channel::mpsc::{channel, Sender};
78
use futures::Sink;
89
use futures::SinkExt;
910
use futures::Stream;
1011
use futures::StreamExt;
11-
use futures::channel::mpsc::{Sender, channel};
12-
use pgt_configuration::PartialConfiguration;
1312
use pgt_configuration::database::PartialDatabaseConfiguration;
13+
use pgt_configuration::PartialConfiguration;
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::Serialize;
2019
use serde::de::DeserializeOwned;
20+
use serde::Serialize;
2121
use serde_json::Value;
2222
use serde_json::{from_value, to_value};
2323
use sqlx::Executor;
@@ -26,7 +26,6 @@ use std::fmt::Display;
2626
use std::time::Duration;
2727
use tower::timeout::Timeout;
2828
use tower::{Service, ServiceExt};
29-
use tower_lsp::LspService;
3029
use tower_lsp::jsonrpc;
3130
use tower_lsp::jsonrpc::Response;
3231
use tower_lsp::lsp_types as lsp;
@@ -48,6 +47,7 @@ use tower_lsp::lsp_types::{
4847
PublishDiagnosticsParams, TextDocumentContentChangeEvent, TextDocumentIdentifier,
4948
TextDocumentItem, Url, VersionedTextDocumentIdentifier,
5049
};
50+
use tower_lsp::LspService;
5151
use tower_lsp::{jsonrpc::Request, lsp_types::InitializeParams};
5252

5353
/// Statically build an [Url] instance that points to the file at `$path`
@@ -1393,7 +1393,9 @@ async fn extends_config() -> Result<()> {
13931393
// test_two extends it but keeps the default one
13941394
let mut conf_without_db = PartialConfiguration::init();
13951395
conf_without_db.merge_with(PartialConfiguration {
1396-
extends: Some(StringSet::from_iter(["../postgrestools.jsonc".to_string()])),
1396+
extends: Some(StringSet::from_iter([Path::new("..")
1397+
.join("postgrestools.jsonc")
1398+
.to_string()])),
13971399
..Default::default()
13981400
});
13991401
fs.insert(

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::{StreamExt, stream};
13+
use futures::{stream, StreamExt};
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-
Diagnostic, DiagnosticExt, Error, Severity, serde::Diagnostic as SDiagnostic,
21+
serde::Diagnostic as SDiagnostic, Diagnostic, DiagnosticExt, Error, Severity,
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,
3130
configuration::to_analyser_rules,
3231
features::{
3332
code_actions::{
3433
self, CodeAction, CodeActionKind, CodeActionsResult, CommandAction,
3534
CommandActionCategory, ExecuteStatementParams, ExecuteStatementResult,
3635
},
37-
completions::{CompletionsResult, GetCompletionsParams, get_statement_for_completions},
36+
completions::{get_statement_for_completions, CompletionsResult, GetCompletionsParams},
3837
diagnostics::{PullDiagnosticsParams, PullDiagnosticsResult},
3938
},
4039
settings::{WorkspaceSettings, WorkspaceSettingsHandle, WorkspaceSettingsHandleMut},
40+
WorkspaceError,
4141
};
4242

4343
use super::{

justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ alias r := ready
66
alias l := lint
77
alias t := test
88
alias rg := reset-git
9+
alias qm := quick-modify
910

1011
# Installs the tools needed to develop
1112
install-tools:
@@ -139,6 +140,11 @@ quick-create branch commit:
139140
git push
140141
gh pr create --fill
141142

143+
quick-modify:
144+
git add -A
145+
git commit -m "progress"
146+
git push
147+
142148
# Make sure to set your PGT_LOG_PATH in your shell profile.
143149
# You can use the PGT_LOG_LEVEL to set your log level.
144150
# We recommend to install `bunyan` (npm i -g bunyan) and pipe the output through there for color-coding:

0 commit comments

Comments
 (0)