diff options
| author | cornishon <zadroznyadam@pm.me> | 2025-01-29 20:16:23 +0100 |
|---|---|---|
| committer | cornishon <zadroznyadam@pm.me> | 2025-01-29 20:16:23 +0100 |
| commit | 9b3716bc244fbc224ba4c3d9bbcade028cd7548c (patch) | |
| tree | 278fdb896b5214cd0b050ebc381a1af87f453810 /src/server/completion.odin | |
| parent | a71caaac9f8ac113d81fc714a41c9b9e96d1fee7 (diff) | |
Add `allocator` field completion to dynamic arrays and maps
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 130cc1a..343d5be 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -1697,6 +1697,16 @@ append_magic_map_completion :: proc( return } + // allocator + { + item := CompletionItem { + label = "allocator", + kind = .Field, + detail = fmt.tprintf("%v.%v: %v", "Raw_Map", "allocator", "runtime.Allocator"), + } + append(items, item) + } + remove_range := common.Range { start = range.start, end = range.end, @@ -1803,6 +1813,16 @@ append_magic_dynamic_array_completion :: proc( return } + // allocator + { + item := CompletionItem { + label = "allocator", + kind = .Field, + detail = fmt.tprintf("%v.%v: %v", "Raw_Dynamic_Array", "allocator", "runtime.Allocator"), + } + append(items, item) + } + prefix := "&" suffix := "" if symbol.pointers > 0 { @@ -2054,3 +2074,4 @@ swizzle_coord_map: map[u8]bool = { } swizzle_coord_components: []string = {"x", "y", "z", "w"} + |