diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-01-29 20:57:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-29 20:57:07 +0100 |
| commit | a694b72cf952bfbab719c1da524079e79ffcfe9b (patch) | |
| tree | 278fdb896b5214cd0b050ebc381a1af87f453810 | |
| parent | a71caaac9f8ac113d81fc714a41c9b9e96d1fee7 (diff) | |
| parent | 9b3716bc244fbc224ba4c3d9bbcade028cd7548c (diff) | |
Merge pull request #586 from cornishon/cornishon/allocator_completion
Add `allocator` field completion to dynamic arrays and maps
| -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"} + |