aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/highlight_defs.h')
-rw-r--r--src/nvim/highlight_defs.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h
index 927fc94bbe..3518c8bdcc 100644
--- a/src/nvim/highlight_defs.h
+++ b/src/nvim/highlight_defs.h
@@ -7,6 +7,34 @@
typedef int32_t RgbValue;
+/// Highlighting attribute bits.
+typedef enum {
+ HL_INVERSE = 0x01,
+ HL_BOLD = 0x02,
+ HL_ITALIC = 0x04,
+ HL_UNDERLINE = 0x08,
+ HL_UNDERCURL = 0x10,
+ HL_STANDOUT = 0x20,
+} HlAttrFlags;
+
+/// Stores a complete highlighting entry, including colors and attributes
+/// for both TUI and GUI.
+typedef struct attr_entry {
+ int16_t rgb_ae_attr, cterm_ae_attr; // HL_BOLD, etc.
+ RgbValue rgb_fg_color, rgb_bg_color, rgb_sp_color;
+ int cterm_fg_color, cterm_bg_color;
+} HlAttrs;
+
+#define HLATTRS_INIT (HlAttrs) { \
+ .rgb_ae_attr = 0, \
+ .cterm_ae_attr = 0, \
+ .rgb_fg_color = -1, \
+ .rgb_bg_color = -1, \
+ .rgb_sp_color = -1, \
+ .cterm_fg_color = 0, \
+ .cterm_bg_color = 0, \
+}
+
/// Values for index in highlight_attr[].
/// When making changes, also update hlf_names below!
typedef enum {
@@ -59,6 +87,7 @@ typedef enum {
, HLF_QFL // selected quickfix line
, HLF_0 // Whitespace
, HLF_INACTIVE // NormalNC: Normal text in non-current windows
+ , HLF_MSGSEP // message separator line
, HLF_COUNT // MUST be the last one
} hlf_T;
@@ -109,7 +138,8 @@ EXTERN const char *hlf_names[] INIT(= {
[HLF_MC] = "ColorColumn",
[HLF_QFL] = "QuickFixLine",
[HLF_0] = "Whitespace",
- [HLF_INACTIVE] = "NormalNC"
+ [HLF_INACTIVE] = "NormalNC",
+ [HLF_MSGSEP] = "MsgSeparator",
});
@@ -117,7 +147,6 @@ EXTERN int highlight_attr[HLF_COUNT]; // Highl. attr for each context.
EXTERN int highlight_user[9]; // User[1-9] attributes
EXTERN int highlight_stlnc[9]; // On top of user
EXTERN int cterm_normal_fg_color INIT(= 0);
-EXTERN int cterm_normal_fg_bold INIT(= 0);
EXTERN int cterm_normal_bg_color INIT(= 0);
EXTERN RgbValue normal_fg INIT(= -1);
EXTERN RgbValue normal_bg INIT(= -1);