aboutsummaryrefslogtreecommitdiff
path: root/src/server/completion.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 13:43:00 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 13:43:00 -0400
commit37c4ec0b95cdfac3000ddd3fb95b0466b3dbc0b7 (patch)
tree85be48bc2313b9f9df4a7c2fb132e5b9ee10ac07 /src/server/completion.odin
parent50a3fd1799c23074452802dcd51fef5c4e03d525 (diff)
Construct current package from the current file when searching index
Diffstat (limited to 'src/server/completion.odin')
-rw-r--r--src/server/completion.odin9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index 33b30d6..29ae7bb 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -1035,9 +1035,8 @@ get_selector_completion :: proc(
is_incomplete = true
pkg := selector.pkg
- current_pkg := ast_context.current_package
- if searched, ok := fuzzy_search(field, {pkg}, current_pkg, ast_context.fullpath); ok {
+ if searched, ok := fuzzy_search(field, {pkg}, ast_context.fullpath); ok {
for search in searched {
symbol := search.symbol
@@ -1568,7 +1567,7 @@ get_identifier_completion :: proc(
append(&pkgs, ast_context.document_package)
append(&pkgs, "$builtin")
- if fuzzy_results, ok := fuzzy_search(lookup_name, pkgs[:], ast_context.current_package, ast_context.fullpath); ok {
+ if fuzzy_results, ok := fuzzy_search(lookup_name, pkgs[:], ast_context.fullpath); ok {
for r in fuzzy_results {
r := r
resolve_unresolved_symbol(ast_context, &r.symbol)
@@ -1683,8 +1682,8 @@ get_identifier_completion :: proc(
for keyword, docs in keywords_docs {
item := CompletionItem {
- label = keyword,
- kind = .Keyword,
+ label = keyword,
+ kind = .Keyword,
documentation = docs,
}