diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-07 09:54:04 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-07 09:54:04 -0400 |
| commit | 3bf249dc5d684995c9dcbd6045dd0b68595b4b0d (patch) | |
| tree | eb3d0cbbb9a6f9cd50017899d4db4ea9e2c9a5c9 /src/server | |
| parent | b0074c3a0df4f6ccf145b8348b172a16fb13553a (diff) | |
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 |