1#ifndef NVIM_SIGN_DEFS_H
2#define NVIM_SIGN_DEFS_H
3
4#include "nvim/pos.h"
5#include "nvim/types.h"
6
7// signs: line annotations
8
9// Sign group
10typedef struct signgroup_S
11{
12 uint16_t refcount; // number of signs in this group
13 int next_sign_id; // next sign id for this group
14 char_u sg_name[1]; // sign group name
15} signgroup_T;
16
17// Macros to get the sign group structure from the group name
18#define SGN_KEY_OFF offsetof(signgroup_T, sg_name)
19#define HI2SG(hi) ((signgroup_T *)((hi)->hi_key - SGN_KEY_OFF))
20
21typedef struct signlist signlist_T;
22
23struct signlist
24{
25 int id; // unique identifier for each placed sign
26 linenr_T lnum; // line number which has this sign
27 int typenr; // typenr of sign
28 signgroup_T *group; // sign group
29 int priority; // priority for highlighting
30 signlist_T *next; // next signlist entry
31 signlist_T *prev; // previous entry -- for easy reordering
32};
33
34// Default sign priority for highlighting
35#define SIGN_DEF_PRIO 10
36
37// type argument for buf_getsigntype() and sign_get_attr()
38typedef enum {
39 SIGN_ANY,
40 SIGN_LINEHL,
41 SIGN_ICON,
42 SIGN_TEXT,
43 SIGN_NUMHL,
44} SignType;
45
46
47
48#endif // NVIM_SIGN_DEFS_H
49