You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// but we need the position within the *statement*.
372
+
let stmt_range = doc
373
+
.statement_range(statement_ref)
374
+
.expect("Range of statement should be defined.");
375
+
let position = offset - stmt_range.start();
376
+
377
+
let tree = self.tree_sitter.fetch(statement_ref);
378
+
let text = statement.text;
363
379
364
-
let tree = self.tree_sitter.fetch(&statement_ref);
365
-
let text = doc
366
-
.statement_by_id(statement_ref.id)
367
-
.expect("Found statement_ref but no matching statement")
368
-
.text;
380
+
tracing::info!("Found the statement. We're looking for position {:?}. Statement Range {:?} to {:?}. Statement: {}", position, stmt_range.start(), stmt_range.end(), text);
369
381
370
382
let schema_cache = self
371
383
.schema_cache
372
384
.read()
373
385
.map_err(|_| WorkspaceError::runtime("Unable to load SchemaCache"))?;
374
386
375
387
let result = pg_completions::complete(pg_completions::CompletionParams{
0 commit comments