diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-29 19:50:55 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-29 19:50:55 -0400 |
| commit | f6a16912a968d4afc527b6784694085cd857626e (patch) | |
| tree | d408fdbbcbba30629a44349d71a4ccd342bd3e4f /src/server/collector.odin | |
| parent | c9af6de66b4ab64ed65a9ea118db9036f4ea414d (diff) | |
Mark collected distinct symbols as distinct and improve hover information
Diffstat (limited to 'src/server/collector.odin')
| -rw-r--r-- | src/server/collector.odin | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin index c59a46c..5888326 100644 --- a/src/server/collector.odin +++ b/src/server/collector.odin @@ -469,10 +469,12 @@ collect_symbols :: proc(collection: ^SymbolCollection, file: ast.File, uri: stri col_expr = helper.type } } + is_distinct := false if dist, ok := col_expr.derived.(^ast.Distinct_Type); ok { if dist.type != nil { col_expr = dist.type + is_distinct = true } } @@ -612,6 +614,7 @@ collect_symbols :: proc(collection: ^SymbolCollection, file: ast.File, uri: stri 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) + symbol.flags |= {.Distinct} if expr.builtin || strings.contains(uri, "builtin.odin") { symbol.pkg = "$builtin" |