extmark_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_EXTMARK_DEFS_H
2 #define NVIM_EXTMARK_DEFS_H
3 
4 #include "nvim/lib/kvec.h"
5 #include "nvim/types.h"
6 
7 typedef struct Decoration Decoration;
8 
9 typedef struct {
10  char *text;
11  int hl_id;
13 
14 
15 typedef struct {
16  uint64_t ns_id;
17  uint64_t mark_id;
18  // TODO(bfredl): a lot of small allocations. Should probably use
19  // kvec_t(Decoration) as an arena. Alternatively, store ns_id/mark_id
20  // _inline_ in MarkTree and use the map only for decorations.
22 } ExtmarkItem;
23 
25 typedef kvec_t(ExtmarkUndoObject) extmark_undo_vec_t;
26 
27 // Undo/redo extmarks
28 
29 typedef enum {
30  kExtmarkNOOP, // Extmarks shouldn't be moved
31  kExtmarkUndo, // Operation should be reversible/undoable
32  kExtmarkNoUndo, // Operation should not be reversible
33  kExtmarkUndoNoRedo, // Operation should be undoable, but not redoable
34 } ExtmarkOp;
35 
36 typedef enum {
40 } DecorLevel;
41 
42 #endif // NVIM_EXTMARK_DEFS_H
DecorLevel
DecorLevel
Definition: extmark_defs.h:36
types.h
ExtmarkItem
Definition: extmark_defs.h:15
kDecorLevelVisible
@ kDecorLevelVisible
Definition: extmark_defs.h:38
ExtmarkItem::decor
Decoration * decor
Definition: extmark_defs.h:21
ExtmarkItem::mark_id
uint64_t mark_id
Definition: extmark_defs.h:17
ExtmarkItem::ns_id
uint64_t ns_id
Definition: extmark_defs.h:16
kExtmarkNoUndo
@ kExtmarkNoUndo
Definition: extmark_defs.h:32
kExtmarkNOOP
@ kExtmarkNOOP
Definition: extmark_defs.h:30
VirtTextChunk
Definition: extmark_defs.h:9
kvec.h
ExtmarkOp
ExtmarkOp
Definition: extmark_defs.h:29
kDecorLevelNone
@ kDecorLevelNone
Definition: extmark_defs.h:37
VirtTextChunk::hl_id
int hl_id
Definition: extmark_defs.h:11
kExtmarkUndo
@ kExtmarkUndo
Definition: extmark_defs.h:31
undo_object
Definition: extmark.h:71
kDecorLevelVirtLine
@ kDecorLevelVirtLine
Definition: extmark_defs.h:39
VirtTextChunk::text
char * text
Definition: extmark_defs.h:10
kExtmarkUndoNoRedo
@ kExtmarkUndoNoRedo
Definition: extmark_defs.h:33
Decoration
Definition: decoration.h:34
kvec_t
typedef kvec_t(ExtmarkUndoObject) extmark_undo_vec_t