@@ -51,9 +51,9 @@ impl VqlutLsp {
5151 // TODO: Parse the VQL-UT file at the given position to find the table/column
5252 // For now, return a dummy response with schema-based navigation
5353 if let Some ( ( table, _) ) = self . schema . iter ( ) . next ( ) {
54- Some ( GotoDefinitionResponse :: Scalar ( GotoDefinitionLink {
55- target_uri : uri,
56- target_range : Range {
54+ Some ( GotoDefinitionResponse :: Scalar ( Location {
55+ uri,
56+ range : Range {
5757 start : Position {
5858 line : line as u32 ,
5959 character : character as u32 ,
@@ -63,22 +63,11 @@ impl VqlutLsp {
6363 character : character as u32 + table. len ( ) as u32 ,
6464 } ,
6565 } ,
66- target_selection_range : Some ( Range {
67- start : Position {
68- line : line as u32 ,
69- character : character as u32 ,
70- } ,
71- end : Position {
72- line : line as u32 ,
73- character : character as u32 + table. len ( ) as u32 ,
74- } ,
75- } ) ,
76- origin_selection_range : None ,
7766 } ) )
7867 } else {
79- Some ( GotoDefinitionResponse :: Scalar ( GotoDefinitionLink {
80- target_uri : uri,
81- target_range : Range {
68+ Some ( GotoDefinitionResponse :: Scalar ( Location {
69+ uri,
70+ range : Range {
8271 start : Position {
8372 line : line as u32 ,
8473 character : character as u32 ,
@@ -88,17 +77,6 @@ impl VqlutLsp {
8877 character : character as u32 + 10 ,
8978 } ,
9079 } ,
91- target_selection_range : Some ( Range {
92- start : Position {
93- line : line as u32 ,
94- character : character as u32 ,
95- } ,
96- end : Position {
97- line : line as u32 ,
98- character : character as u32 + 10 ,
99- } ,
100- } ) ,
101- origin_selection_range : None ,
10280 } ) )
10381 }
10482 }
@@ -130,7 +108,7 @@ impl VqlutLsp {
130108
131109 pub fn handle_completion ( & self , params : CompletionParams ) -> Option < CompletionResponse > {
132110 // Extract the position from the params
133- let position = params. text_document_position_params . position ;
111+ let position = params. text_document_position . position ;
134112 let line = position. line as usize ;
135113 let character = position. character as usize ;
136114
@@ -175,9 +153,6 @@ impl VqlutLsp {
175153 }
176154 }
177155
178- Some ( CompletionResponse {
179- is_incomplete : false ,
180- items,
181- } )
156+ Some ( CompletionResponse :: Array ( items) )
182157 }
183158}
0 commit comments