diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-06 22:39:46 -0500 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-06 22:39:46 -0500 |
| commit | 236f2f1f684577a8bf7daf1f0decfd2686755d05 (patch) | |
| tree | 5499b4783eae99a29056b67a4493dcbaeb376014 /src/server/completion.odin | |
| parent | 265db94b731bdb7388e0d6af52fd8d9a0d93c01c (diff) | |
Fix selector completions for global constant declarations
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 8a0f371..0324b23 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -785,7 +785,10 @@ get_selector_completion :: proc( selector.type != .Field && selector.type != .Package && selector.type != .Enum && - selector.type != .Function { + selector.type != .Function && + (selector.type == .Struct && .Variable not_in selector.flags) { + // We don't want completions for struct types, but we do want completions for constant variables. + // See tests `ast_global_non_mutable_completion` vs `ast_completion_global_selector_from_local_scope` return is_incomplete } |