From 715165b53f055b785e005984038bcae8d88142db Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Fri, 21 Nov 2025 23:19:59 +0100 Subject: Fix so more than one file gets error highlights The previous fix for that did not take multiple files into account. --- src/main/lsp/diagnostics.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/lsp/diagnostics.h') diff --git a/src/main/lsp/diagnostics.h b/src/main/lsp/diagnostics.h index 4357b8e..a5bb5d9 100644 --- a/src/main/lsp/diagnostics.h +++ b/src/main/lsp/diagnostics.h @@ -2,6 +2,7 @@ #define _DIAGNOSTICS_H #include "dged/command.h" +#include "dged/text.h" #include "main/lsp/types.h" struct lsp_server; @@ -10,11 +11,17 @@ struct lsp_notification; struct lsp_diagnostics; +struct lsp_buffer_diagnostics { + struct buffer *buffer; + layer_id layer; + diagnostic_vec diagnostics; +}; + struct lsp_diagnostics *diagnostics_create(void); void diagnostics_destroy(struct lsp_diagnostics *); -diagnostic_vec *diagnostics_for_buffer(struct lsp_diagnostics *, - struct buffer *); +struct lsp_buffer_diagnostics *diagnostics_for_buffer(struct lsp_diagnostics *, + struct buffer *); void handle_publish_diagnostics(struct lsp_server *, struct buffers *, struct lsp_notification *); -- cgit v1.2.3