summaryrefslogtreecommitdiff
path: root/ted-internal.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-29 15:11:47 -0400
committerpommicket <pommicket@gmail.com>2025-09-29 15:29:51 -0400
commit84da626a18ccc779aef4a178ee0097a93c959520 (patch)
treeea862eff35309f2cae3a0ab30112fb38647eafa2 /ted-internal.h
parent16b5baf3083c982220e9feb561f2f53f1720fe2a (diff)
Send over diagnostics; this fixes code actions
Diffstat (limited to 'ted-internal.h')
-rw-r--r--ted-internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ted-internal.h b/ted-internal.h
index 3e8da9f..a4b5574 100644
--- a/ted-internal.h
+++ b/ted-internal.h
@@ -450,6 +450,19 @@ struct Ted {
EditNotifyInfo *edit_notifys;
};
+typedef struct {
+ MessageType severity;
+ // start position
+ BufferPos pos;
+ // end position
+ BufferPos end;
+ char *message;
+ // may be NULL
+ char *url;
+ // raw JSON object (for textDocument/codeAction)
+ char *raw;
+} Diagnostic;
+
// === buffer.c ===
/// create a new empty buffer with no file name
TextBuffer *buffer_new(Ted *ted);
@@ -508,6 +521,7 @@ int buffer_inotify_watch(TextBuffer *buffer);
/// inform buffer that its watch on the Ted's inotify was modified
void buffer_set_inotify_modified(TextBuffer *buffer);
#endif
+const Diagnostic *buffer_diagnostics(TextBuffer *buffer);
// === build.c ===
void build_frame(Ted *ted, float x1, float y1, float x2, float y2);