diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-10 19:26:30 +1100 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-10 19:26:30 +1100 |
| commit | 7acacb7c506af7f6d2277d76f5df5729d8b88566 (patch) | |
| tree | 0039b735ee840e6a268d2770de5ac651e786289d /src/server/completion.odin | |
| parent | 475ef9ec7abaf8a4e1f8eb231fc91372dca60da1 (diff) | |
Correctly resolve builtin types when using the fully qualified name with the package
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 60ca2bc..5bbbcf8 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -966,9 +966,17 @@ get_selector_completion :: proc( case SymbolPackageValue: is_incomplete = true - pkg := selector.pkg + packages := make([dynamic]string, context.temp_allocator) + if is_builtin_pkg(selector.pkg) { + append(&packages, "$builtin") + for built in indexer.builtin_packages { + append(&packages, built) + } + } else { + append(&packages, selector.pkg) + } - if searched, ok := fuzzy_search(field, {pkg}, ast_context.fullpath); ok { + if searched, ok := fuzzy_search(field, packages[:], ast_context.fullpath); ok { for search in searched { symbol := search.symbol |