diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-07 10:14:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-07 10:14:48 -0400 |
| commit | ee54f11d5c08ce7b2000fb0e4a3f60b4b9aeeae6 (patch) | |
| tree | 552de506cf14162c64cb11012b3656322d188dca /src/server | |
| parent | eb07da8a11477a08b5596b2537e3aaa656188f73 (diff) | |
| parent | 3bf249dc5d684995c9dcbd6045dd0b68595b4b0d (diff) | |
Merge pull request #977 from BradLewis/fix/hover-cast
Only show cast hover info if hovering over the `cast` keyword
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/hover.odin | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index af83d0b..4941b87 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -78,7 +78,9 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> return {}, false, true } - if position_context.type_cast != nil { + if position_context.type_cast != nil && // check that we're actually on the 'cast' word + !position_in_node(position_context.type_cast.type, position_context.position) && + !position_in_node(position_context.type_cast.expr, position_context.position) { if str, ok := keywords_docs[position_context.type_cast.tok.text]; ok { hover.contents.kind = "markdown" hover.contents.value = str |