aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-27 21:05:50 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-29 15:49:12 -0400
commit65adde811fedf1fd3054a736e9d2faf63fcfad31 (patch)
treed913a46215a374ceaf723c067add2c3b1e92d814 /src/server
parentca1e78574de49aa5b73df422736cdf4b0f093ecd (diff)
Update signature information
Diffstat (limited to 'src/server')
-rw-r--r--src/server/documentation.odin4
-rw-r--r--src/server/signature.odin23
2 files changed, 16 insertions, 11 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index 9767a9d..9d72043 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -339,7 +339,7 @@ get_short_signature :: proc(ast_context: ^AstContext, symbol: Symbol) -> string
append_type_information(&sb, ast_context, symbol, pointer_prefix)
strings.write_string(&sb, " :: ")
}
- write_procedure_symbol_signature(&sb, v, detailed_signature=false)
+ write_procedure_symbol_signature(&sb, v, detailed_signature=true)
return strings.to_string(sb)
case SymbolAggregateValue:
return "proc (..)"
@@ -686,7 +686,6 @@ concatenate_raw_symbol_information :: proc(ast_context: ^AstContext, symbol: Sym
symbol.name,
symbol.signature,
symbol.type,
- symbol.comment,
)
}
@@ -696,7 +695,6 @@ concatenate_raw_string_information :: proc(
name: string,
signature: string,
type: SymbolType,
- comment: string,
) -> string {
pkg := path.base(pkg, false, context.temp_allocator)
diff --git a/src/server/signature.odin b/src/server/signature.odin
index 03634d5..f333b61 100644
--- a/src/server/signature.odin
+++ b/src/server/signature.odin
@@ -134,11 +134,14 @@ get_signature_information :: proc(document: ^Document, position: common.Position
parameters[i].label = node_to_string(arg)
}
- build_documentation(&ast_context, &call)
-
+ call.doc = construct_symbol_docs(call.doc, call.comment)
+ sb := strings.builder_make(context.temp_allocator)
+ write_procedure_symbol_signature(&sb, value, detailed_signature = false)
+ call.signature = strings.to_string(sb)
+
info := SignatureInformation {
- label = concatenate_symbol_information(&ast_context, call),
- documentation = call.doc,
+ label = concatenate_raw_string_information(&ast_context, call.pkg, call.name, call.signature, call.type),
+ documentation = construct_symbol_docs(call.doc, call.comment),
parameters = parameters,
}
append(&signature_information, info)
@@ -160,11 +163,15 @@ get_signature_information :: proc(document: ^Document, position: common.Position
parameters[i].label = node_to_string(arg)
}
- build_documentation(&ast_context, &symbol)
-
+ symbol.doc = construct_symbol_docs(symbol.doc, symbol.comment)
+ sb := strings.builder_make(context.temp_allocator)
+ write_procedure_symbol_signature(&sb, value, detailed_signature = false)
+ symbol.signature = strings.to_string(sb)
+
info := SignatureInformation {
- label = concatenate_symbol_information(&ast_context, symbol),
- documentation = symbol.doc,
+ label = concatenate_raw_string_information(&ast_context, symbol.pkg, symbol.name, symbol.signature, symbol.type),
+ documentation = construct_symbol_docs(symbol.doc, symbol.comment),
+ parameters = parameters,
}
append(&signature_information, info)