diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-25 16:32:06 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-25 16:32:06 +0200 |
| commit | 6ec6afac04b470ff7fa6b668bdab290af56297af (patch) | |
| tree | bd45a96516c27bd0c2311c4a7327b1306d1399d1 /src/server | |
| parent | ba3eaa84a7e843aadd66bdf336ecae550c43f34a (diff) | |
Fix issue with union having a type from a different package.
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/completion.odin | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 7038cbd..59e762c 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -447,9 +447,13 @@ get_selector_completion :: proc( documentation = symbol.doc, } + //Might be a hack... + _, is_selector := type.derived.(^ast.Selector_Expr) + if symbol.pkg == ast_context.document_package || base == "runtime" || - base == "$builtin" { + base == "$builtin" || + is_selector { item.label = fmt.aprintf( "(%v%v)", common.repeat( |