aboutsummaryrefslogtreecommitdiff
path: root/src/server/requests.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-03-10 15:16:58 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-03-10 15:16:58 +0100
commit968e428c217e963b82e3c8fd39b9a9721e00f7d6 (patch)
tree83c80c6d669b448c482570479d2fe721ddc34f1a /src/server/requests.odin
parent9f1e92e8316ff0db92a3e72d0a21d1e7311171f3 (diff)
Use murmur hash and bucket a map in each package.
Diffstat (limited to 'src/server/requests.odin')
-rw-r--r--src/server/requests.odin14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin
index 62ef3b1..8b988cc 100644
--- a/src/server/requests.odin
+++ b/src/server/requests.odin
@@ -816,11 +816,13 @@ notification_did_save :: proc (params: json.Value, id: RequestId, config: ^commo
log.errorf("error in parse file for indexing %v", fullpath)
}
- for key, value in index.indexer.dynamic_index.collection.symbols {
- if value.uri == uri.uri {
- index.free_symbol(value, context.allocator)
- index.indexer.dynamic_index.collection.symbols[key] = {}
- }
+ for k, v in &index.indexer.dynamic_index.collection.packages {
+ for k2, v2 in &v {
+ if v2.uri == uri.uri {
+ index.free_symbol(v2, context.allocator)
+ v[k2] = {}
+ }
+ }
}
if ret := index.collect_symbols(&index.indexer.dynamic_index.collection, file, uri.uri); ret != .None {
@@ -995,6 +997,8 @@ request_inlay_hint :: proc (params: json.Value, id: RequestId, config: ^common.C
hints: []InlayHint
+ resolve_entire_file(document)
+
if cache_symbols, ok := file_resolve_cache.files[document.uri.uri]; ok {
hints, ok = get_inlay_hints(document, cache_symbols)
}