diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-02-23 12:16:28 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-03-10 12:11:05 +0100 |
commit | 425bc438ae1ae6bb207dcc56186be952049f9149 (patch) | |
tree | 6b98b60f813e368c46f652a21b4a9be1e8d96b80 /src/nvim/decoration.h | |
parent | c12ea02e0b5d465e2c4b7d8bba028d069bdf7008 (diff) | |
download | rneovim-425bc438ae1ae6bb207dcc56186be952049f9149.tar.gz rneovim-425bc438ae1ae6bb207dcc56186be952049f9149.tar.bz2 rneovim-425bc438ae1ae6bb207dcc56186be952049f9149.zip |
decorations: add additional styling of virt_text overlays
Diffstat (limited to 'src/nvim/decoration.h')
-rw-r--r-- | src/nvim/decoration.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/decoration.h b/src/nvim/decoration.h index 47bd9abbc3..264e8a4a82 100644 --- a/src/nvim/decoration.h +++ b/src/nvim/decoration.h @@ -23,15 +23,26 @@ typedef enum { kVTOverlay, } VirtTextPos; +typedef enum { + kHlModeUnknown, + kHlModeReplace, + kHlModeCombine, + kHlModeBlend, +} HlMode; + struct Decoration { int hl_id; // highlight group VirtText virt_text; VirtTextPos virt_text_pos; + bool virt_text_hide; + HlMode hl_mode; // TODO(bfredl): style, signs, etc DecorPriority priority; bool shared; // shared decoration, don't free }; +#define DECORATION_INIT { 0, KV_INITIAL_VALUE, kVTEndOfLine, false, \ + kHlModeUnknown, DECOR_PRIORITY_BASE, false } typedef struct { int start_row; @@ -39,9 +50,13 @@ typedef struct { int end_row; int end_col; int attr_id; + // TODO(bfredl): embed decoration instead, perhaps using an arena + // for ephemerals? DecorPriority priority; VirtText *virt_text; VirtTextPos virt_text_pos; + bool virt_text_hide; + HlMode hl_mode; bool virt_text_owned; int virt_col; } HlRange; |