From c1fc712b7d6f53e41411ef8587db47f451a4bbb3 Mon Sep 17 00:00:00 2001 From: Daniel Gavin Date: Fri, 4 Mar 2022 20:04:43 +0100 Subject: give more memory to allocator --- src/server/documents.odin | 8 +------- src/server/requests.odin | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/server') 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) } -- cgit v1.2.3