aboutsummaryrefslogtreecommitdiff
path: root/src/server/collector.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-25 09:17:22 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-25 17:47:16 -0400
commit9bbb4b4450b5310a68aa4497a3125674452037d7 (patch)
treeb5f1dad8a8277d613dd1b00938b8a73f49713134 /src/server/collector.odin
parent344eea71fbf1863106bc051dbae11534e7dcca74 (diff)
Add proc comments to hover information
Diffstat (limited to 'src/server/collector.odin')
-rw-r--r--src/server/collector.odin2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin
index 667e8c8..c59a46c 100644
--- a/src/server/collector.odin
+++ b/src/server/collector.odin
@@ -610,6 +610,8 @@ collect_symbols :: proc(collection: ^SymbolCollection, file: ast.File, uri: stri
symbol.name = get_index_unique_string(collection, name)
symbol.type = token_type
symbol.doc = get_doc(expr.docs, collection.allocator)
+ comment := get_file_comment(file, symbol.range.start.line + 1)
+ symbol.comment = strings.clone(get_comment(comment), collection.allocator)
if expr.builtin || strings.contains(uri, "builtin.odin") {
symbol.pkg = "$builtin"