From 4459b8b3aa9d73895391785a99dcc87134e80601 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Tue, 17 Sep 2024 08:47:03 +0200 Subject: More lsp support This makes the LSP support complete for now: - Completion - Diagnostics - Goto implementation/declaration - Rename - Documentation - Find references --- src/main/lsp/diagnostics.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/main/lsp/diagnostics.h (limited to 'src/main/lsp/diagnostics.h') diff --git a/src/main/lsp/diagnostics.h b/src/main/lsp/diagnostics.h new file mode 100644 index 0000000..4357b8e --- /dev/null +++ b/src/main/lsp/diagnostics.h @@ -0,0 +1,26 @@ +#ifndef _DIAGNOSTICS_H +#define _DIAGNOSTICS_H + +#include "dged/command.h" +#include "main/lsp/types.h" + +struct lsp_server; +struct buffers; +struct lsp_notification; + +struct lsp_diagnostics; + +struct lsp_diagnostics *diagnostics_create(void); +void diagnostics_destroy(struct lsp_diagnostics *); + +diagnostic_vec *diagnostics_for_buffer(struct lsp_diagnostics *, + struct buffer *); +void handle_publish_diagnostics(struct lsp_server *, struct buffers *, + struct lsp_notification *); + +/* COMMANDS */ +int32_t diagnostics_cmd(struct command_ctx, int, const char **); +int32_t next_diagnostic_cmd(struct command_ctx, int, const char **); +int32_t prev_diagnostic_cmd(struct command_ctx, int, const char **); + +#endif -- cgit v1.2.3