aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-03-04 20:04:43 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-03-04 20:04:43 +0100
commitc1fc712b7d6f53e41411ef8587db47f451a4bbb3 (patch)
treecd69764315fdca18944df8eb8a6aa139c83f549f /src/server
parent2d9f5709d74992e0cd485099a5a8cdf12178e80d (diff)
give more memory to allocator
Diffstat (limited to 'src/server')
-rw-r--r--src/server/documents.odin8
-rw-r--r--src/server/requests.odin2
2 files changed, 3 insertions, 7 deletions
diff --git a/src/server/documents.odin b/src/server/documents.odin
index 3bb4a01..9c70035 100644
--- a/src/server/documents.odin
+++ b/src/server/documents.odin
@@ -48,7 +48,7 @@ document_get_allocator :: proc() -> ^common.Scratch_Allocator {
return pop(&document_storage.free_allocators)
} else {
allocator := new(common.Scratch_Allocator)
- common.scratch_allocator_init(allocator, mem.megabytes(1))
+ common.scratch_allocator_init(allocator, mem.megabytes(3))
return allocator
}
}
@@ -299,12 +299,6 @@ document_refresh :: proc(document: ^common.Document, config: ^common.Config, wri
}
}
- //We only resolve the entire file, if we are dealing with the heavy features that require the entire file resolved.
- //This gives the user a choice to use "fast mode" with only completion and gotos.
- if config.enable_semantic_tokens || config.enable_inlay_hints {
- resolve_entire_file(document)
- }
-
return .None
}
diff --git a/src/server/requests.odin b/src/server/requests.odin
index 00af132..e5b8254 100644
--- a/src/server/requests.odin
+++ b/src/server/requests.odin
@@ -866,6 +866,8 @@ request_semantic_token_full :: proc (params: json.Value, id: RequestId, config:
symbols: SemanticTokens
if config.enable_semantic_tokens {
+ resolve_entire_file(document)
+
if cache_symbols, ok := file_resolve_cache.files[document.uri.uri]; ok {
symbols = get_semantic_tokens(document, range, cache_symbols)
}