diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-08-10 14:39:49 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2025-08-10 14:39:49 +0200 |
| commit | 90a41ff247b050228e1a6e1a9fe0486948ca6b9e (patch) | |
| tree | 0eaaebcb2dce6ef68590551c56ae4d4b1825018f /src | |
| parent | c816acb6d6c683900b75910a5237c155533ba9fe (diff) | |
Fix compiler issues with contextless
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/check.odin | 2 | ||||
| -rw-r--r-- | src/server/completion.odin | 4 | ||||
| -rw-r--r-- | src/server/hover.odin | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/src/server/check.odin b/src/server/check.odin index 4b7da85..ea68066 100644 --- a/src/server/check.odin +++ b/src/server/check.odin @@ -20,7 +20,7 @@ import "core:thread" import "src:common" //Store uris we have reported on since last save. We use this to clear them on next save. -uris_reported := make([dynamic]string) +uris_reported: [dynamic]string Json_Error :: struct { type: string, diff --git a/src/server/completion.odin b/src/server/completion.odin index ae9d984..25018df 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -14,6 +14,7 @@ import "core:slice" import "core:sort" import "core:strconv" import "core:strings" +import "base:runtime" import "src:common" @@ -397,7 +398,8 @@ DIRECTIVE_NAME_LIST :: []string { completion_items_directives: []CompletionResult @(init) -_init_completion_items_directives :: proc() { +_init_completion_items_directives :: proc "contextless" () { + context = runtime.default_context() completion_items_directives = slice.mapper(DIRECTIVE_NAME_LIST, proc(name: string) -> CompletionResult { return CompletionResult{ completion_item = CompletionItem{ diff --git a/src/server/hover.odin b/src/server/hover.odin index 364585d..4719685 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -48,11 +48,7 @@ write_hover_content :: proc(ast_context: ^AstContext, symbol: Symbol) -> MarkupC } builtin_identifier_hover: map[string]string = { - "context" = fmt.aprintf( - "```odin\n%v\n```\n%v", - "runtime.context: Context", - "This context variable is local to each scope and is implicitly passed by pointer to any procedure call in that scope (if the procedure has the Odin calling convention).", - ), + "context" = "```odin\nruntime.context: Context\n```\nThis context variable is local to each scope and is implicitly passed by pointer to any procedure call in that scope (if the procedure has the Odin calling convention).", } |