mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
decoration: split out "decoration" from "extmark" module
Decorations will only grow more complex. move the to a separate file, so that extmark.c remains about extmarks.
This commit is contained in:
@@ -4,21 +4,7 @@
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/lib/kvec.h"
|
||||
|
||||
typedef struct {
|
||||
char *text;
|
||||
int hl_id;
|
||||
} VirtTextChunk;
|
||||
|
||||
typedef kvec_t(VirtTextChunk) VirtText;
|
||||
#define VIRTTEXT_EMPTY ((VirtText)KV_INITIAL_VALUE)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int hl_id; // highlight group
|
||||
VirtText virt_text;
|
||||
// TODO(bfredl): style, signs, etc
|
||||
bool shared; // shared decoration, don't free
|
||||
} Decoration;
|
||||
typedef struct Decoration Decoration;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -42,21 +28,4 @@ typedef enum {
|
||||
kExtmarkUndoNoRedo, // Operation should be undoable, but not redoable
|
||||
} ExtmarkOp;
|
||||
|
||||
typedef struct {
|
||||
NS ns_id;
|
||||
bool active;
|
||||
LuaRef redraw_start;
|
||||
LuaRef redraw_buf;
|
||||
LuaRef redraw_win;
|
||||
LuaRef redraw_line;
|
||||
LuaRef redraw_end;
|
||||
LuaRef hl_def;
|
||||
int hl_valid;
|
||||
} DecorationProvider;
|
||||
|
||||
#define DECORATION_PROVIDER_INIT(ns_id) (DecorationProvider) \
|
||||
{ ns_id, false, LUA_NOREF, LUA_NOREF, \
|
||||
LUA_NOREF, LUA_NOREF, LUA_NOREF, \
|
||||
LUA_NOREF, -1 }
|
||||
|
||||
#endif // NVIM_EXTMARK_DEFS_H
|
||||
|
Reference in New Issue
Block a user