diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-10-03 22:41:14 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2025-10-03 22:41:14 +0200 |
| commit | f252aad41d51df05abab2a00490d8e7f16bc488d (patch) | |
| tree | de2f3012a26aa0d6810f59a7a608a90d21b3b7d0 /src/server/requests.odin | |
| parent | fe88eb50b8d695a8f05e07846408751e56b054ee (diff) | |
Added diagnostic system to collect all the diagnostics. Unused imports are shown on save and open.
Diffstat (limited to 'src/server/requests.odin')
| -rw-r--r-- | src/server/requests.odin | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index e153503..49119aa 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -1041,6 +1041,12 @@ notification_did_open :: proc( return .InternalError } + document := document_get(open_params.textDocument.uri) + + check_unused_imports(document, config) + + push_diagnostics(writer) + return .None } @@ -1135,7 +1141,13 @@ notification_did_save :: proc( corrected_uri := common.create_uri(fullpath, context.temp_allocator) - check(config.profile.checker_path[:], corrected_uri, writer, config) + check(config.profile.checker_path[:], corrected_uri, config) + + document := document_get(save_params.textDocument.uri) + + check_unused_imports(document, config) + + push_diagnostics(writer) return .None } |