aboutsummaryrefslogtreecommitdiff
path: root/src/server/symbol.odin
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-30 19:52:45 -0400
committerGitHub <noreply@github.com>2025-08-30 19:52:45 -0400
commite9a88954b6df0e72b19a0ec6af92e8d24a200511 (patch)
treea579bd6f4d5d8167f65f55f8cd06cd0ec728e5c1 /src/server/symbol.odin
parent2ec8e676dc375e951f89f9d679adfd485b247d3c (diff)
parent0583fbd35b14e32b848972d1a0d916f7bf9185a3 (diff)
Merge pull request #947 from BradLewis/feat/workspace-symbols-fields
Show struct and bitfield fields with workspace and document symbols
Diffstat (limited to 'src/server/symbol.odin')
-rw-r--r--src/server/symbol.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index 7fab60c..3a4b7c6 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -772,6 +772,8 @@ symbol_kind_to_type :: proc(type: SymbolType) -> SymbolKind {
return .Enum
case .Keyword:
return .Key
+ case .Field:
+ return .Field
case:
return .Null
}
@@ -851,6 +853,7 @@ construct_struct_field_symbol :: proc(symbol: ^Symbol, parent_name: string, valu
symbol.parent_name = parent_name
symbol.doc = get_doc(value.types[index], value.docs[index], context.temp_allocator)
symbol.comment = get_comment(value.comments[index])
+ symbol.range = value.ranges[index]
}
construct_bit_field_field_symbol :: proc(
@@ -865,6 +868,7 @@ construct_bit_field_field_symbol :: proc(
symbol.doc = get_doc(value.types[index], value.docs[index], context.temp_allocator)
symbol.comment = get_comment(value.comments[index])
symbol.signature = get_bit_field_field_signature(value, index)
+ symbol.range = value.ranges[index]
}
construct_enum_field_symbol :: proc(symbol: ^Symbol, value: SymbolEnumValue, index: int) {