diff options
| author | Albert Cervin <albert@acervin.com> | 2025-11-21 23:19:59 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2025-11-21 23:19:59 +0100 |
| commit | 715165b53f055b785e005984038bcae8d88142db (patch) | |
| tree | de98a91d22fa0303cdfd552ecb8fd3ed8e3bb8a9 /src/main/lsp/diagnostics.h | |
| parent | e04a05de866f9b903bd426bfc6a4bada9b70c89a (diff) | |
| download | dged-715165b53f055b785e005984038bcae8d88142db.tar.gz dged-715165b53f055b785e005984038bcae8d88142db.tar.xz dged-715165b53f055b785e005984038bcae8d88142db.zip | |
Fix so more than one file gets error highlights
The previous fix for that did not take multiple files into account.
Diffstat (limited to 'src/main/lsp/diagnostics.h')
| -rw-r--r-- | src/main/lsp/diagnostics.h | 11 |
1 files changed, 9 insertions, 2 deletions
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 *); |
