diff options
Diffstat (limited to 'src/nvim/decoration.h')
-rw-r--r-- | src/nvim/decoration.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/nvim/decoration.h b/src/nvim/decoration.h index 8f28442d41..c9ec8ede7f 100644 --- a/src/nvim/decoration.h +++ b/src/nvim/decoration.h @@ -1,9 +1,17 @@ #ifndef NVIM_DECORATION_H #define NVIM_DECORATION_H +#include <stdbool.h> +#include <stddef.h> +#include <stdint.h> + +#include "klib/kvec.h" #include "nvim/buffer_defs.h" #include "nvim/extmark_defs.h" +#include "nvim/macros.h" +#include "nvim/marktree.h" #include "nvim/pos.h" +#include "nvim/types.h" // actual Decoration data is in extmark_defs.h @@ -28,7 +36,6 @@ typedef enum { EXTERN const char *const hl_mode_str[] INIT(= { "", "replace", "combine", "blend" }); -typedef kvec_t(VirtTextChunk) VirtText; #define VIRTTEXT_EMPTY ((VirtText)KV_INITIAL_VALUE) typedef kvec_t(struct virt_line { VirtText line; bool left_col; }) VirtLines; @@ -46,11 +53,12 @@ struct Decoration { bool hl_eol; bool virt_lines_above; bool conceal; + TriState spell; // TODO(bfredl): style, etc DecorPriority priority; int col; // fixed col value, like win_col int virt_text_width; // width of virt_text - char_u *sign_text; + char *sign_text; int sign_hl_id; int number_hl_id; int line_hl_id; @@ -61,8 +69,8 @@ struct Decoration { bool ui_watched; // watched for win_extmark }; #define DECORATION_INIT { KV_INITIAL_VALUE, KV_INITIAL_VALUE, 0, kVTEndOfLine, \ - kHlModeUnknown, false, false, false, false, DECOR_PRIORITY_BASE, \ - 0, 0, NULL, 0, 0, 0, 0, 0, false } + kHlModeUnknown, false, false, false, false, kNone, \ + DECOR_PRIORITY_BASE, 0, 0, NULL, 0, 0, 0, 0, 0, false } typedef struct { int start_row; @@ -90,6 +98,8 @@ typedef struct { bool conceal; int conceal_char; int conceal_attr; + + TriState spell; } DecorState; EXTERN DecorState decor_state INIT(= { 0 }); |