diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-03 13:30:30 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-03 19:48:15 -0400 |
| commit | 650ddc73125112ad8e4fe638114c0cda2854c993 (patch) | |
| tree | 8a9e4521aec0e3d18ec4145e639588d85572e2bd /src/server/hover.odin | |
| parent | 8fd95cac8b24ae6311009ea96cc9947a7b430d87 (diff) | |
Add hover information to enum implicit and explicit assignments
Diffstat (limited to 'src/server/hover.odin')
| -rw-r--r-- | src/server/hover.odin | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index 52663a8..aaddd08 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -301,6 +301,19 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> } } } + case SymbolEnumValue: + for name, i in v.names { + if name == field { + symbol := Symbol { + name = selector.name, + pkg = selector.pkg, + } + // TODO: update this to go through some kind of common `get_signature` + symbol.signature = fmt.tprintf(".%s", name) + hover.contents = write_hover_content(&ast_context, symbol) + return hover, true, true + } + } } } else if position_context.implicit_selector_expr != nil { implicit_selector := position_context.implicit_selector_expr |