Macros | Functions
highlight.c File Reference
#include "nvim/api/private/defs.h"
#include "nvim/api/private/helpers.h"
#include "nvim/decoration_provider.h"
#include "nvim/highlight.h"
#include "nvim/highlight_defs.h"
#include "nvim/highlight_group.h"
#include "nvim/lua/executor.h"
#include "nvim/map.h"
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/popupmnu.h"
#include "nvim/screen.h"
#include "nvim/ui.h"
#include "nvim/vim.h"


#define CHECK_FLAG(d, m, name, extra, flag)


bool highlight_use_hlstate (void)
void ui_send_all_hls (UI *ui)
 When a UI connects, we need to send it the table of highlights used so far. More...
int hl_get_syn_attr (int ns_id, int idx, HlAttrs at_en)
 Get attribute code for a syntax group. More...
void ns_hl_def (NS ns_id, int hl_id, HlAttrs attrs, int link_id, Dict(highlight) *dict)
int ns_get_hl (NS ns_id, int hl_id, bool link, bool nodefault)
bool win_check_ns_hl (win_T *wp)
int hl_get_ui_attr (int idx, int final_id, bool optional)
void update_window_hl (win_T *wp, bool invalid)
int hl_get_underline (void)
 Gets HL_UNDERLINE highlight. More...
int hl_get_term_attr (HlAttrs *aep)
 Get attribute code for forwarded :terminal highlights. More...
void clear_hl_tables (bool reinit)
 Clear all highlight tables. More...
void hl_invalidate_blends (void)
int hl_combine_attr (int char_attr, int prim_attr)
int hl_blend_attrs (int back_attr, int front_attr, bool *through)
HlAttrs syn_attr2entry (int attr)
 Get highlight attributes for a attribute code. More...
Dictionary hl_get_attr_by_id (Integer attr_id, Boolean rgb, Error *err)
 Gets highlight description for id attr_id as a map. More...
Dictionary hlattrs2dict (HlAttrs ae, bool use_rgb)
HlAttrs dict2hlattrs (Dict(highlight) *dict, bool use_rgb, int *link_id, Error *err)
int object_to_color (Object val, char *key, bool rgb, Error *err)
Array hl_inspect (int attr)

Macro Definition Documentation


#define CHECK_FLAG (   d,
if (api_object_to_bool(d->name##extra, #name, false, err)) { \
m = m | flag; \

Function Documentation

◆ clear_hl_tables()

void clear_hl_tables ( bool  reinit)

Clear all highlight tables.

◆ dict2hlattrs()

HlAttrs dict2hlattrs ( Dict(highlight) *  dict,
bool  use_rgb,
int *  link_id,
Error err 

◆ highlight_use_hlstate()

bool highlight_use_hlstate ( void  )
true if hl table was reset

◆ hl_blend_attrs()

int hl_blend_attrs ( int  back_attr,
int  front_attr,
bool through 

Blend overlay attributes (for popupmenu) with other attributes

This creates a new group when required. This is called per-cell, so cache the result.

the resulting attributes.

◆ hl_combine_attr()

int hl_combine_attr ( int  char_attr,
int  prim_attr 

◆ hl_get_attr_by_id()

Dictionary hl_get_attr_by_id ( Integer  attr_id,
Boolean  rgb,
Error err 

Gets highlight description for id attr_id as a map.

◆ hl_get_syn_attr()

int hl_get_syn_attr ( int  ns_id,
int  idx,
HlAttrs  at_en 

Get attribute code for a syntax group.

◆ hl_get_term_attr()

int hl_get_term_attr ( HlAttrs aep)

Get attribute code for forwarded :terminal highlights.

◆ hl_get_ui_attr()

int hl_get_ui_attr ( int  idx,
int  final_id,
bool  optional 

Get attribute code for a builtin highlight group.

The final syntax group could be modified by hi-link or 'winhighlight'.

◆ hl_get_underline()

int hl_get_underline ( void  )

Gets HL_UNDERLINE highlight.

◆ hl_inspect()

Array hl_inspect ( int  attr)

◆ hl_invalidate_blends()

void hl_invalidate_blends ( void  )

◆ hlattrs2dict()

Dictionary hlattrs2dict ( HlAttrs  ae,
bool  use_rgb 

Converts an HlAttrs into Dictionary

[in]aepdata to convert
use_rgbuse 'gui*' settings if true, else resorts to 'cterm*'

◆ ns_get_hl()

int ns_get_hl ( NS  ns_id,
int  hl_id,
bool  link,
bool  nodefault 

◆ ns_hl_def()

void ns_hl_def ( NS  ns_id,
int  hl_id,
HlAttrs  attrs,
int  link_id,
Dict(highlight) *  dict 

◆ object_to_color()

int object_to_color ( Object  val,
char *  key,
bool  rgb,
Error err 

◆ syn_attr2entry()

HlAttrs syn_attr2entry ( int  attr)

Get highlight attributes for a attribute code.

◆ ui_send_all_hls()

void ui_send_all_hls ( UI ui)

When a UI connects, we need to send it the table of highlights used so far.

◆ update_window_hl()

void update_window_hl ( win_T wp,
bool  invalid 

◆ win_check_ns_hl()

bool win_check_ns_hl ( win_T wp)
static int int flag
Definition: regexp_nfa.c:5944
bool api_object_to_bool(Object obj, const char *what, bool nil_value, Error *err)
Definition: helpers.c:1291
matchitem_T * m
Definition: match.c:41
char_u * name
Definition: userfunc.c:817