diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-01-19 07:40:55 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-19 07:40:55 +1100 |
| commit | e21db4a48e04e558e0aa3a46e0bd7668168714e1 (patch) | |
| tree | 1c19de0a88f56b8dfc7e58aa38c1208aea12d16b /src/server/hover.odin | |
| parent | 93cd45fd5077ae70158102fe7c3a1ead62e262cc (diff) | |
| parent | 3494339e5b56ca90356dac095918d2bf02832baa (diff) | |
Merge pull request #1254 from louisdutton/hoverdoc-improvements
Improve hover documentation formatting
Diffstat (limited to 'src/server/hover.odin')
| -rw-r--r-- | src/server/hover.odin | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index ca791ef..9b42f7e 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -16,7 +16,11 @@ write_hover_content :: proc(ast_context: ^AstContext, symbol: Symbol) -> MarkupC if cat != "" { content.kind = "markdown" - content.value = fmt.tprintf("```odin\n%v\n```%v", cat, doc) + if doc != "" { + content.value = fmt.tprintf(DOC_FMT_MARKDOWN, cat, doc) + } else { + content.value = fmt.tprintf(DOC_FMT_ODIN, cat) + } } else { content.kind = "plaintext" } |