diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-06-22 23:06:13 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2025-06-22 23:06:13 +0200 |
| commit | 3d1b2a5d7849c16dac4acea8b205af15be3351f4 (patch) | |
| tree | e30deffd287d5b746fbd8fb7d951a95b942e8c74 /src/server/requests.odin | |
| parent | ce13ab49907f45331260454477d2c22856baf633 (diff) | |
Start working on caching the packages of your project that are not used yet.
Diffstat (limited to 'src/server/requests.odin')
| -rw-r--r-- | src/server/requests.odin | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index 19a99b7..52df45c 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -410,7 +410,7 @@ read_ols_initialize_options :: proc(config: ^common.Config, ols_config: OlsConfi } if config.profile.os == "" { - config.profile.os = fmt.aprint(ODIN_OS) + config.profile.os = os_enum_to_string[ODIN_OS] } if config.profile.arch == "" { @@ -735,6 +735,8 @@ request_initialize :: proc( register_dynamic_capabilities(writer) } + find_all_package_aliases() + return .None } @@ -1477,13 +1479,21 @@ notification_did_change_watched_files :: proc( if uri, ok := common.parse_uri(change.uri, context.temp_allocator); ok { remove_index_file(uri) } + clear_all_package_aliases() + find_all_package_aliases() } else { if uri, ok := common.parse_uri(change.uri, context.temp_allocator); ok { if data, ok := os.read_entire_file(uri.path); ok { index_file(uri, cast(string)data) } } + if change.type == cast(int)FileChangeType.Created { + clear_all_package_aliases() + find_all_package_aliases() + } } + + } return .None |