aboutsummaryrefslogtreecommitdiff
path: root/src/server/completion.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 13:04:55 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 13:04:55 -0400
commit50a3fd1799c23074452802dcd51fef5c4e03d525 (patch)
treea448af819ee0826220342f71af6d9eb8d486b75b /src/server/completion.odin
parent8ee9db53bf77e676afa6ebf9c5a1b5bc6504c627 (diff)
Use current package rather than file path to filter private symbols
Diffstat (limited to 'src/server/completion.odin')
-rw-r--r--src/server/completion.odin5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index b06c67f..33b30d6 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -1035,8 +1035,9 @@ get_selector_completion :: proc(
is_incomplete = true
pkg := selector.pkg
+ current_pkg := ast_context.current_package
- if searched, ok := fuzzy_search(field, {pkg}, ast_context.fullpath); ok {
+ if searched, ok := fuzzy_search(field, {pkg}, current_pkg, ast_context.fullpath); ok {
for search in searched {
symbol := search.symbol
@@ -1567,7 +1568,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.fullpath); ok {
+ if fuzzy_results, ok := fuzzy_search(lookup_name, pkgs[:], ast_context.current_package, ast_context.fullpath); ok {
for r in fuzzy_results {
r := r
resolve_unresolved_symbol(ast_context, &r.symbol)