From 88a91d1328c9b48b45f97e3dc8a03f7767ef8162 Mon Sep 17 00:00:00 2001 From: DanielGavin Date: Sat, 11 Jan 2025 19:52:28 +0100 Subject: [PATCH] Fix issue with warning on save. --- src/server/check.odin | 2 +- src/server/hover.odin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/check.odin b/src/server/check.odin index b02587b..4b7da85 100644 --- a/src/server/check.odin +++ b/src/server/check.odin @@ -157,7 +157,7 @@ check :: proc(paths: []string, uri: common.Uri, writer: ^Writer, config: ^common &errors[error.pos.file], Diagnostic { code = "checker", - severity = .Error if error.type == "error" else .Warning, + severity = .Error, range = { start = {character = error.pos.column - 1, line = error.pos.line - 1}, end = {character = error.pos.end_column - 1, line = error.pos.line - 1}, diff --git a/src/server/hover.odin b/src/server/hover.odin index 9b53a18..ad9a9c6 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -192,7 +192,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> set_ast_package_set_scoped(&ast_context, selector.pkg) if selector, ok = resolve_type_expression(&ast_context, v.return_types[0].type); !ok { - return {}, false, false + return {}, false, true } }