Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supabase-community/postgres-language-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: supabase-community/postgres-language-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refs/heads/fix/logs
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 4, 2025

  1. fix: log more

    psteinroe committed Apr 4, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    psteinroe Philipp Steinrötter
    Copy the full SHA
    3b2f735 View commit details
  2. fix: cleanup

    psteinroe committed Apr 4, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    psteinroe Philipp Steinrötter
    Copy the full SHA
    82531c1 View commit details
Showing with 6 additions and 17 deletions.
  1. +2 −0 crates/pgt_lsp/src/handlers/code_actions.rs
  2. +1 −5 crates/pgt_lsp/src/handlers/completions.rs
  3. +3 −12 crates/pgt_lsp/src/handlers/text_document.rs
2 changes: 2 additions & 0 deletions crates/pgt_lsp/src/handlers/code_actions.rs
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ use pgt_workspace::features::code_actions::{
CodeActionKind, CodeActionsParams, CommandActionCategory, ExecuteStatementParams,
};

#[tracing::instrument(level = "debug", skip(session), err)]
pub fn get_actions(
session: &Session,
params: lsp_types::CodeActionParams,
@@ -71,6 +72,7 @@ pub fn command_id(command: &CommandActionCategory) -> String {
}
}

#[tracing::instrument(level = "debug", skip(session), err)]
pub async fn execute_command(
session: &Session,
params: ExecuteCommandParams,
6 changes: 1 addition & 5 deletions crates/pgt_lsp/src/handlers/completions.rs
Original file line number Diff line number Diff line change
@@ -3,11 +3,7 @@ use anyhow::Result;
use pgt_workspace::{WorkspaceError, features::completions::GetCompletionsParams};
use tower_lsp::lsp_types::{self, CompletionItem, CompletionItemLabelDetails};

#[tracing::instrument(level = "debug", skip_all, fields(
url = params.text_document_position.text_document.uri.as_str(),
character = params.text_document_position.position.character,
line = params.text_document_position.position.line
), err)]
#[tracing::instrument(level = "debug", skip(session), err)]
pub fn get_completions(
session: &Session,
params: lsp_types::CompletionParams,
15 changes: 3 additions & 12 deletions crates/pgt_lsp/src/handlers/text_document.rs
Original file line number Diff line number Diff line change
@@ -10,10 +10,7 @@ use tower_lsp::lsp_types;
use tracing::error;

/// Handler for `textDocument/didOpen` LSP notification
#[tracing::instrument(level = "info", skip_all, fields(
url = params.text_document.uri.as_str(),
version = params.text_document.version
), err)]
#[tracing::instrument(level = "debug", skip(session), err)]
pub(crate) async fn did_open(
session: &Session,
params: lsp_types::DidOpenTextDocumentParams,
@@ -41,11 +38,7 @@ pub(crate) async fn did_open(
}

// Handler for `textDocument/didChange` LSP notification
#[tracing::instrument(level = "debug", skip_all, fields(
uri = params.text_document.uri.as_str(),
version = params.text_document.version,
num_content_changes = params.content_changes.len()
), err)]
#[tracing::instrument(level = "debug", skip(session), err)]
pub(crate) async fn did_change(
session: &Session,
params: lsp_types::DidChangeTextDocumentParams,
@@ -97,9 +90,7 @@ pub(crate) async fn did_change(
}

/// Handler for `textDocument/didClose` LSP notification
#[tracing::instrument(level = "info", skip_all, fields(
url = params.text_document.uri.as_str(),
), err)]
#[tracing::instrument(level = "debug", skip(session), err)]
pub(crate) async fn did_close(
session: &Session,
params: lsp_types::DidCloseTextDocumentParams,