Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
highlight_defs.h File Reference
#include <inttypes.h>
#include "nvim/macros.h"
#include "nvim/types.h"

Go to the source code of this file.

Data Structures

struct  attr_entry
 
struct  HlEntry
 
struct  ColorKey
 
struct  ColorItem
 

Macros

#define HLATTRS_INIT
 
#define ColorKey(n, s)   (ColorKey) { .ns_id = (int)(n), .syn_id = (s) }
 
#define COLOR_ITEM_INITIALIZER
 

Typedefs

typedef int32_t RgbValue
 
typedef struct attr_entry HlAttrs
 

Enumerations

enum  HlAttrFlags {
  HL_INVERSE = 0x01, HL_BOLD = 0x02, HL_ITALIC = 0x04, HL_UNDERLINE = 0x08,
  HL_UNDERCURL = 0x10, HL_STANDOUT = 0x20, HL_STRIKETHROUGH = 0x40, HL_NOCOMBINE = 0x80,
  HL_BG_INDEXED = 0x0100, HL_FG_INDEXED = 0x0200, HL_DEFAULT = 0x0400, HL_GLOBAL = 0x0800
}
 
enum  hlf_T {
  HLF_8 = 0, HLF_EOB, HLF_TERM, HLF_TERMNC,
  HLF_AT, HLF_D, HLF_E, HLF_I,
  HLF_L, HLF_M, HLF_CM, HLF_N,
  HLF_LNA, HLF_LNB, HLF_CLN, HLF_R,
  HLF_S, HLF_SNC, HLF_C, HLF_T,
  HLF_V, HLF_VNC, HLF_W, HLF_WM,
  HLF_FL, HLF_FC, HLF_ADD, HLF_CHD,
  HLF_DED, HLF_TXD, HLF_SC, HLF_CONCEAL,
  HLF_SPB, HLF_SPC, HLF_SPR, HLF_SPL,
  HLF_PNI, HLF_PSI, HLF_PSB, HLF_PST,
  HLF_TP, HLF_TPS, HLF_TPF, HLF_CUC,
  HLF_CUL, HLF_MC, HLF_QFL, HLF_0,
  HLF_INACTIVE, HLF_MSGSEP, HLF_NFLOAT, HLF_MSG,
  HLF_BORDER, HLF_COUNT
}
 
enum  HlKind {
  kHlUnknown, kHlUI, kHlSyntax, kHlTerminal,
  kHlCombine, kHlBlend, kHlBlendThrough
}
 

Functions

const EXTERN char *hlf_names[] INIT (={[HLF_8]="SpecialKey", [HLF_EOB]="EndOfBuffer", [HLF_TERM]="TermCursor", [HLF_TERMNC]="TermCursorNC", [HLF_AT]="NonText", [HLF_D]="Directory", [HLF_E]="ErrorMsg", [HLF_I]="IncSearch", [HLF_L]="Search", [HLF_M]="MoreMsg", [HLF_CM]="ModeMsg", [HLF_N]="LineNr", [HLF_LNA]="LineNrAbove", [HLF_LNB]="LineNrBelow", [HLF_CLN]="CursorLineNr", [HLF_R]="Question", [HLF_S]="StatusLine", [HLF_SNC]="StatusLineNC", [HLF_C]="VertSplit", [HLF_T]="Title", [HLF_V]="Visual", [HLF_VNC]="VisualNC", [HLF_W]="WarningMsg", [HLF_WM]="WildMenu", [HLF_FL]="Folded", [HLF_FC]="FoldColumn", [HLF_ADD]="DiffAdd", [HLF_CHD]="DiffChange", [HLF_DED]="DiffDelete", [HLF_TXD]="DiffText", [HLF_SC]="SignColumn", [HLF_CONCEAL]="Conceal", [HLF_SPB]="SpellBad", [HLF_SPC]="SpellCap", [HLF_SPR]="SpellRare", [HLF_SPL]="SpellLocal", [HLF_PNI]="Pmenu", [HLF_PSI]="PmenuSel", [HLF_PSB]="PmenuSbar", [HLF_PST]="PmenuThumb", [HLF_TP]="TabLine", [HLF_TPS]="TabLineSel", [HLF_TPF]="TabLineFill", [HLF_CUC]="CursorColumn", [HLF_CUL]="CursorLine", [HLF_MC]="ColorColumn", [HLF_QFL]="QuickFixLine", [HLF_0]="Whitespace", [HLF_INACTIVE]="NormalNC", [HLF_MSGSEP]="MsgSeparator", [HLF_NFLOAT]="NormalFloat", [HLF_MSG]="MsgArea", [HLF_BORDER]="FloatBorder", })
 

Variables

EXTERN int highlight_attr [HLF_COUNT]
 
EXTERN int highlight_attr_last [HLF_COUNT]
 
EXTERN int highlight_user [9]
 
EXTERN int highlight_stlnc [9]
 

Macro Definition Documentation

◆ COLOR_ITEM_INITIALIZER

#define COLOR_ITEM_INITIALIZER
Value:
{ .attr_id = -1, .link_id = -1, \
.version = -1, .is_default = false }

◆ ColorKey

#define ColorKey (   n,
  s 
)    (ColorKey) { .ns_id = (int)(n), .syn_id = (s) }

◆ HLATTRS_INIT

#define HLATTRS_INIT
Value:
(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, \
.hl_blend = -1, \
}

Typedef Documentation

◆ HlAttrs

typedef struct attr_entry HlAttrs

Stores a complete highlighting entry, including colors and attributes for both TUI and GUI.

◆ RgbValue

typedef int32_t RgbValue

Enumeration Type Documentation

◆ HlAttrFlags

Highlighting attribute bits.

sign bit should not be used here, as it identifies invalid highlight

Enumerator
HL_INVERSE 
HL_BOLD 
HL_ITALIC 
HL_UNDERLINE 
HL_UNDERCURL 
HL_STANDOUT 
HL_STRIKETHROUGH 
HL_NOCOMBINE 
HL_BG_INDEXED 
HL_FG_INDEXED 
HL_DEFAULT 
HL_GLOBAL 

◆ hlf_T

enum hlf_T

Values for index in highlight_attr[]. When making changes, also update hlf_names below!

Enumerator
HLF_8 
HLF_EOB 
HLF_TERM 
HLF_TERMNC 
HLF_AT 
HLF_D 
HLF_E 
HLF_I 
HLF_L 
HLF_M 
HLF_CM 
HLF_N 
HLF_LNA 
HLF_LNB 
HLF_CLN 
HLF_R 
HLF_S 
HLF_SNC 
HLF_C 
HLF_T 
HLF_V 
HLF_VNC 
HLF_W 
HLF_WM 
HLF_FL 
HLF_FC 
HLF_ADD 
HLF_CHD 
HLF_DED 
HLF_TXD 
HLF_SC 
HLF_CONCEAL 
HLF_SPB 
HLF_SPC 
HLF_SPR 
HLF_SPL 
HLF_PNI 
HLF_PSI 
HLF_PSB 
HLF_PST 
HLF_TP 
HLF_TPS 
HLF_TPF 
HLF_CUC 
HLF_CUL 
HLF_MC 
HLF_QFL 
HLF_0 
HLF_INACTIVE 
HLF_MSGSEP 
HLF_NFLOAT 
HLF_MSG 
HLF_BORDER 
HLF_COUNT 

◆ HlKind

enum HlKind
Enumerator
kHlUnknown 
kHlUI 
kHlSyntax 
kHlTerminal 
kHlCombine 
kHlBlend 
kHlBlendThrough 

Function Documentation

◆ INIT()

const EXTERN char* hlf_names [] INIT ( )

Variable Documentation

◆ highlight_attr

EXTERN int highlight_attr[HLF_COUNT]

◆ highlight_attr_last

EXTERN int highlight_attr_last[HLF_COUNT]

◆ highlight_stlnc

EXTERN int highlight_stlnc[9]

◆ highlight_user

EXTERN int highlight_user[9]
HlAttrs
struct attr_entry HlAttrs