summaryrefslogtreecommitdiff
path: root/src/dged/text.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-09-17 08:47:03 +0200
committerAlbert Cervin <albert@acervin.com>2025-11-01 22:11:14 +0100
commit4459b8b3aa9d73895391785a99dcc87134e80601 (patch)
treea5204f447a0b2b05f63504c7fe958ef9bbf1918a /src/dged/text.h
parent4689f3f38277bb64981fc960e8e384e2d065d659 (diff)
downloaddged-4459b8b3aa9d73895391785a99dcc87134e80601.tar.gz
dged-4459b8b3aa9d73895391785a99dcc87134e80601.tar.xz
dged-4459b8b3aa9d73895391785a99dcc87134e80601.zip
More lsp support
This makes the LSP support complete for now: - Completion - Diagnostics - Goto implementation/declaration - Rename - Documentation - Find references
Diffstat (limited to 'src/dged/text.h')
-rw-r--r--src/dged/text.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/dged/text.h b/src/dged/text.h
index 505c86a..ec14650 100644
--- a/src/dged/text.h
+++ b/src/dged/text.h
@@ -62,9 +62,13 @@ struct text_property_colors {
uint32_t fg;
bool set_bg;
uint32_t bg;
+ bool underline;
+ bool inverted;
};
struct text_property {
+ struct location start;
+ struct location end;
enum text_property_type type;
union property_data {
struct text_property_colors colors;
@@ -72,14 +76,34 @@ struct text_property {
} data;
};
+typedef uint64_t layer_id;
+enum layer_ids {
+ PropertyLayer_Default = 0,
+};
+
void text_add_property(struct text *text, uint32_t start_line,
uint32_t start_offset, uint32_t end_line,
uint32_t end_offset, struct text_property property);
+void text_add_property_to_layer(struct text *text, uint32_t start_line,
+ uint32_t start_offset, uint32_t end_line,
+ uint32_t end_offset,
+ struct text_property property, layer_id layer);
+
+layer_id text_add_property_layer(struct text *text);
+void text_remove_property_layer(struct text *text, layer_id layer);
+
void text_get_properties(struct text *text, uint32_t line, uint32_t offset,
struct text_property **properties,
uint32_t max_nproperties, uint32_t *nproperties);
+void text_get_properties_filtered(struct text *text, uint32_t line,
+ uint32_t offset,
+ struct text_property **properties,
+ uint32_t max_nproperties,
+ uint32_t *nproperties, layer_id layer);
+
void text_clear_properties(struct text *text);
+void text_clear_property_layer(struct text *text, layer_id layer);
#endif