1
1
use pgt_schema_cache:: ProcKind ;
2
2
3
- use pgt_treesitter:: context:: { CompletionContext , NodeUnderCursor , WrappingClause , WrappingNode } ;
3
+ use pgt_treesitter:: context:: { NodeUnderCursor , TreesitterContext , WrappingClause , WrappingNode } ;
4
4
5
5
use super :: CompletionRelevanceData ;
6
6
@@ -16,7 +16,7 @@ impl<'a> From<CompletionRelevanceData<'a>> for CompletionFilter<'a> {
16
16
}
17
17
18
18
impl CompletionFilter < ' _ > {
19
- pub fn is_relevant ( & self , ctx : & CompletionContext ) -> Option < ( ) > {
19
+ pub fn is_relevant ( & self , ctx : & TreesitterContext ) -> Option < ( ) > {
20
20
self . completable_context ( ctx) ?;
21
21
self . check_clause ( ctx) ?;
22
22
self . check_invocation ( ctx) ?;
@@ -25,7 +25,7 @@ impl CompletionFilter<'_> {
25
25
Some ( ( ) )
26
26
}
27
27
28
- fn completable_context ( & self , ctx : & CompletionContext ) -> Option < ( ) > {
28
+ fn completable_context ( & self , ctx : & TreesitterContext ) -> Option < ( ) > {
29
29
if ctx. wrapping_node_kind . is_none ( ) && ctx. wrapping_clause_type . is_none ( ) {
30
30
return None ;
31
31
}
@@ -70,7 +70,7 @@ impl CompletionFilter<'_> {
70
70
Some ( ( ) )
71
71
}
72
72
73
- fn check_clause ( & self , ctx : & CompletionContext ) -> Option < ( ) > {
73
+ fn check_clause ( & self , ctx : & TreesitterContext ) -> Option < ( ) > {
74
74
ctx. wrapping_clause_type
75
75
. as_ref ( )
76
76
. map ( |clause| {
@@ -208,7 +208,7 @@ impl CompletionFilter<'_> {
208
208
. and_then ( |is_ok| if is_ok { Some ( ( ) ) } else { None } )
209
209
}
210
210
211
- fn check_invocation ( & self , ctx : & CompletionContext ) -> Option < ( ) > {
211
+ fn check_invocation ( & self , ctx : & TreesitterContext ) -> Option < ( ) > {
212
212
if !ctx. is_invocation {
213
213
return Some ( ( ) ) ;
214
214
}
@@ -221,7 +221,7 @@ impl CompletionFilter<'_> {
221
221
Some ( ( ) )
222
222
}
223
223
224
- fn check_mentioned_schema_or_alias ( & self , ctx : & CompletionContext ) -> Option < ( ) > {
224
+ fn check_mentioned_schema_or_alias ( & self , ctx : & TreesitterContext ) -> Option < ( ) > {
225
225
if ctx. schema_or_alias_name . is_none ( ) {
226
226
return Some ( ( ) ) ;
227
227
}
0 commit comments