aboutsummaryrefslogtreecommitdiff
path: root/src/server/methods.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-22 08:30:39 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-22 10:16:24 -0400
commit81cf474010cdf0591266f78aa7a712979864e89a (patch)
tree1e2a799c6d85032168ff4d048cfe5992753f1d21 /src/server/methods.odin
parentfdf4aa1dc49b47f641b771fc9e0791489f4e5526 (diff)
Move comments from details to the end of the docs for the symbol and
use markdown for completion docs
Diffstat (limited to 'src/server/methods.odin')
-rw-r--r--src/server/methods.odin7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/methods.odin b/src/server/methods.odin
index f17be51..4b8e74e 100644
--- a/src/server/methods.odin
+++ b/src/server/methods.odin
@@ -67,7 +67,7 @@ append_method_completion :: proc(
if symbols, ok := &v.methods[method]; ok {
for &symbol in symbols {
resolve_unresolved_symbol(ast_context, &symbol)
- symbol.signature = get_short_signature(ast_context, symbol)
+ build_documentation(ast_context, &symbol)
range, ok := get_range_from_selection_start_to_dot(position_context)
@@ -113,7 +113,7 @@ append_method_completion :: proc(
if symbol.pkg != ast_context.document_package {
new_text = fmt.tprintf(
"%v.%v",
- path.base(get_symbol_pkg_name(ast_context, symbol), false, ast_context.allocator),
+ path.base(get_symbol_pkg_name(ast_context, &symbol), false, ast_context.allocator),
symbol.name,
)
} else {
@@ -125,11 +125,12 @@ append_method_completion :: proc(
} else {
new_text = fmt.tprintf("%v(%v%v%v)$0", new_text, references, receiver, dereferences)
}
+ build_documentation(ast_context, &symbol)
item := CompletionItem {
label = symbol.name,
kind = symbol_type_to_completion_kind(symbol.type),
- detail = get_short_signature(ast_context, symbol),
+ detail = symbol.signature,
additionalTextEdits = remove_edit,
textEdit = TextEdit{newText = new_text, range = {start = range.end, end = range.end}},
insertTextFormat = .Snippet,