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.h52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h
index a4dcf6eb60..24070199ee 100644
--- a/src/nvim/highlight_defs.h
+++ b/src/nvim/highlight_defs.h
@@ -1,10 +1,9 @@
-#ifndef NVIM_HIGHLIGHT_DEFS_H
-#define NVIM_HIGHLIGHT_DEFS_H
+#pragma once
#include <inttypes.h>
-#include "nvim/macros.h"
-#include "nvim/types.h"
+#include "nvim/macros_defs.h"
+#include "nvim/types_defs.h"
typedef int32_t RgbValue;
@@ -18,8 +17,8 @@ typedef enum {
// The next three bits are all underline styles
HL_UNDERLINE_MASK = 0x38,
HL_UNDERLINE = 0x08,
- HL_UNDERDOUBLE = 0x10,
- HL_UNDERCURL = 0x18,
+ HL_UNDERCURL = 0x10,
+ HL_UNDERDOUBLE = 0x18,
HL_UNDERDOTTED = 0x20,
HL_UNDERDASHED = 0x28,
// 0x30 and 0x38 spare for underline styles
@@ -100,6 +99,10 @@ typedef enum {
HLF_SPL, // SpellLocal
HLF_PNI, // popup menu normal item
HLF_PSI, // popup menu selected item
+ HLF_PNK, // popup menu normal item "kind"
+ HLF_PSK, // popup menu selected item "kind"
+ HLF_PNX, // popup menu normal item "menu" (extra text)
+ HLF_PSX, // popup menu selected item "menu" (extra text)
HLF_PSB, // popup menu scrollbar
HLF_PST, // popup menu scrollbar thumb
HLF_TP, // tabpage line
@@ -119,10 +122,11 @@ typedef enum {
HLF_WBRNC, // Window bars of not-current windows
HLF_CU, // Cursor
HLF_BTITLE, // Float Border Title
+ HLF_BFOOTER, // Float Border Footer
HLF_COUNT, // MUST be the last one
} hlf_T;
-EXTERN const char *hlf_names[] INIT(= {
+EXTERN const char *hlf_names[] INIT( = {
[HLF_8] = "SpecialKey",
[HLF_EOB] = "EndOfBuffer",
[HLF_TERM] = "TermCursor",
@@ -165,6 +169,10 @@ EXTERN const char *hlf_names[] INIT(= {
[HLF_SPL] = "SpellLocal",
[HLF_PNI] = "Pmenu",
[HLF_PSI] = "PmenuSel",
+ [HLF_PNK] = "PmenuKind",
+ [HLF_PSK] = "PmenuKindSel",
+ [HLF_PNX] = "PmenuExtra",
+ [HLF_PSX] = "PmenuExtraSel",
[HLF_PSB] = "PmenuSbar",
[HLF_PST] = "PmenuThumb",
[HLF_TP] = "TabLine",
@@ -184,24 +192,25 @@ EXTERN const char *hlf_names[] INIT(= {
[HLF_WBRNC] = "WinBarNC",
[HLF_CU] = "Cursor",
[HLF_BTITLE] = "FloatTitle",
+ [HLF_BFOOTER] = "FloatFooter",
});
EXTERN int highlight_attr[HLF_COUNT + 1]; // Highl. attr for each context.
EXTERN int highlight_attr_last[HLF_COUNT]; // copy for detecting changed groups
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_bg_color INIT(= 0);
-EXTERN RgbValue normal_fg INIT(= -1);
-EXTERN RgbValue normal_bg INIT(= -1);
-EXTERN RgbValue normal_sp INIT(= -1);
+EXTERN int cterm_normal_fg_color INIT( = 0);
+EXTERN int cterm_normal_bg_color INIT( = 0);
+EXTERN RgbValue normal_fg INIT( = -1);
+EXTERN RgbValue normal_bg INIT( = -1);
+EXTERN RgbValue normal_sp INIT( = -1);
-EXTERN NS ns_hl_global INIT(= 0); // global highlight namespace
-EXTERN NS ns_hl_win INIT(= -1); // highlight namespace for the current window
-EXTERN NS ns_hl_fast INIT(= -1); // highlight namespace specified in a fast callback
-EXTERN NS ns_hl_active INIT(= 0); // currently active/cached namespace
+EXTERN NS ns_hl_global INIT( = 0); // global highlight namespace
+EXTERN NS ns_hl_win INIT( = -1); // highlight namespace for the current window
+EXTERN NS ns_hl_fast INIT( = -1); // highlight namespace specified in a fast callback
+EXTERN NS ns_hl_active INIT( = 0); // currently active/cached namespace
-EXTERN int *hl_attr_active INIT(= highlight_attr);
+EXTERN int *hl_attr_active INIT( = highlight_attr);
typedef enum {
kHlUnknown,
@@ -211,6 +220,7 @@ typedef enum {
kHlCombine,
kHlBlend,
kHlBlendThrough,
+ kHlInvalid,
} HlKind;
typedef struct {
@@ -236,11 +246,3 @@ typedef struct {
} ColorItem;
#define COLOR_ITEM_INITIALIZER { .attr_id = -1, .link_id = -1, .version = -1, \
.is_default = false, .link_global = false }
-
-/// highlight attributes with associated priorities
-typedef struct {
- int attr_id;
- int priority;
-} HlPriAttr;
-
-#endif // NVIM_HIGHLIGHT_DEFS_H