Skip to content

Commit 15f7db1

Browse files
ok ok
1 parent 2b2b637 commit 15f7db1

File tree

4 files changed

+9
-462
lines changed

4 files changed

+9
-462
lines changed

crates/pgt_completions/src/relevance/filtering.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,17 @@ impl CompletionFilter<'_> {
249249
}
250250

251251
CompletionRelevanceData::Role(_) => match clause {
252-
WrappingClause::DropRole
253-
| WrappingClause::AlterRole
254-
| WrappingClause::ToRoleAssignment => true,
252+
WrappingClause::DropRole | WrappingClause::AlterRole => true,
255253

256254
WrappingClause::SetStatement => ctx
257255
.before_cursor_matches_kind(&["keyword_role", "keyword_authorization"]),
258256

259-
WrappingClause::RevokeStatement => {
257+
WrappingClause::RevokeStatement | WrappingClause::GrantStatement => {
260258
ctx.matches_ancestor_history(&["role_specification"])
261259
|| ctx.node_under_cursor.as_ref().is_some_and(|k| {
262260
k.kind() == "identifier"
263261
&& ctx.before_cursor_matches_kind(&[
262+
"keyword_grant",
264263
"keyword_revoke",
265264
"keyword_for",
266265
])

0 commit comments

Comments
 (0)