Skip to content

Commit 0afe6ec

Browse files
fix(completions): lint & test errors
1 parent 9415a5d commit 0afe6ec

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

crates/pg_completions/src/context.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ pub enum ClauseType {
77
Select,
88
Where,
99
From,
10+
Update,
11+
Delete,
1012
}
1113

1214
impl From<&str> for ClauseType {
@@ -15,6 +17,8 @@ impl From<&str> for ClauseType {
1517
"select" => Self::Select,
1618
"where" => Self::Where,
1719
"from" => Self::From,
20+
"update" => Self::Update,
21+
"delete" => Self::Delete,
1822
_ => panic!("Unimplemented ClauseType: {}", value),
1923
}
2024
}

crates/pg_completions/src/test_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use sqlx::Executor;
44

55
use crate::CompletionParams;
66

7-
pub static CURSOR_POS: &str = "XXX";
7+
pub static CURSOR_POS: &str = "";
88

99
pub(crate) async fn get_test_deps(
1010
setup: &str,

crates/pg_lsp/src/utils/to_lsp_types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ pub fn to_completion_kind(
55
) -> lsp_types::CompletionItemKind {
66
match kind {
77
pg_completions::CompletionItemKind::Table => lsp_types::CompletionItemKind::CLASS,
8+
pg_completions::CompletionItemKind::Function => lsp_types::CompletionItemKind::FUNCTION,
89
}
910
}

0 commit comments

Comments
 (0)