aboutsummaryrefslogtreecommitdiff
path: root/src/server/documentation.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-17 12:49:43 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-17 12:49:43 -0400
commit6e0968d764f4913521c6ceaa23d95ea64e18bf04 (patch)
tree1e509f6db6429998552a2dd6fbeeaa160c4ba9a1 /src/server/documentation.odin
parent87693f65296e7e947d530e3274148753603434cc (diff)
Improvements with hover info and distinct symbols
Diffstat (limited to 'src/server/documentation.odin')
-rw-r--r--src/server/documentation.odin16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index c076008..081ccf3 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -290,19 +290,13 @@ get_short_signature :: proc(ast_context: ^AstContext, symbol: Symbol) -> string
write_short_signature :: proc(sb: ^strings.Builder, ast_context: ^AstContext, symbol: Symbol) {
pointer_prefix := repeat("^", symbol.pointers, ast_context.allocator)
+ if .Distinct in symbol.flags {
+ strings.write_string(sb, "distinct ")
+ }
#partial switch v in symbol.value {
case SymbolBasicValue:
- if .Distinct in symbol.flags {
- if symbol.type == .Keyword {
- strings.write_string(sb, "distinct ")
- build_string_node(v.ident, sb, false)
- } else {
- fmt.sbprintf(sb, "%s%s", pointer_prefix, symbol.name)
- }
- } else {
- strings.write_string(sb, pointer_prefix)
- build_string_node(v.ident, sb, false)
- }
+ strings.write_string(sb, pointer_prefix)
+ build_string_node(v.ident, sb, false)
return
case SymbolPolyTypeValue:
fmt.sbprintf(sb, "%s$", pointer_prefix)