aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/highlight_group.c')
-rw-r--r--src/nvim/highlight_group.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c
index b3c4aca1af..901d2c84bc 100644
--- a/src/nvim/highlight_group.c
+++ b/src/nvim/highlight_group.c
@@ -1,5 +1,6 @@
// highlight_group.c: code for managing highlight groups
+#include <assert.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdint.h>
@@ -31,6 +32,7 @@
#include "nvim/garray_defs.h"
#include "nvim/gettext_defs.h"
#include "nvim/globals.h"
+#include "nvim/grid_defs.h"
#include "nvim/highlight.h"
#include "nvim/highlight_group.h"
#include "nvim/lua/executor.h"
@@ -148,7 +150,7 @@ static const char *highlight_init_both[] = {
"PmenuMatchSel gui=bold cterm=bold",
"PmenuSel gui=reverse cterm=reverse,underline blend=0",
"RedrawDebugNormal gui=reverse cterm=reverse",
- "TabLineSel gui=bold cterm=bold",
+ "TabLineSel gui=bold cterm=NONE",
"TermCursor gui=reverse cterm=reverse",
"Underlined gui=underline cterm=underline",
"lCursor guifg=bg guibg=fg",
@@ -173,12 +175,12 @@ static const char *highlight_init_both[] = {
"default link PmenuKind Pmenu",
"default link PmenuKindSel PmenuSel",
"default link PmenuSbar Pmenu",
+ "default link ComplMatchIns NONE",
"default link Substitute Search",
"default link StatusLineTerm StatusLine",
"default link StatusLineTermNC StatusLineNC",
"default link TabLine StatusLineNC",
"default link TabLineFill TabLine",
- "default link TermCursorNC NONE",
"default link VertSplit WinSeparator",
"default link VisualNOS Visual",
"default link Whitespace NonText",
@@ -230,6 +232,11 @@ static const char *highlight_init_both[] = {
"default link DiagnosticVirtualTextInfo DiagnosticInfo",
"default link DiagnosticVirtualTextHint DiagnosticHint",
"default link DiagnosticVirtualTextOk DiagnosticOk",
+ "default link DiagnosticVirtualLinesError DiagnosticError",
+ "default link DiagnosticVirtualLinesWarn DiagnosticWarn",
+ "default link DiagnosticVirtualLinesInfo DiagnosticInfo",
+ "default link DiagnosticVirtualLinesHint DiagnosticHint",
+ "default link DiagnosticVirtualLinesOk DiagnosticOk",
"default link DiagnosticSignError DiagnosticError",
"default link DiagnosticSignWarn DiagnosticWarn",
"default link DiagnosticSignInfo DiagnosticInfo",
@@ -303,7 +310,7 @@ static const char *highlight_init_both[] = {
"default link @tag.builtin Special",
// :help
- // Higlight "===" and "---" heading delimiters specially.
+ // Highlight "===" and "---" heading delimiters specially.
"default @markup.heading.1.delimiter.vimdoc guibg=bg guifg=bg guisp=fg gui=underdouble,nocombine ctermbg=NONE ctermfg=NONE cterm=underdouble,nocombine",
"default @markup.heading.2.delimiter.vimdoc guibg=bg guifg=bg guisp=fg gui=underline,nocombine ctermbg=NONE ctermfg=NONE cterm=underline,nocombine",
@@ -357,7 +364,7 @@ static const char *highlight_init_light[] = {
"ErrorMsg guifg=NvimDarkRed ctermfg=1",
"FloatShadow guibg=NvimLightGrey4 ctermbg=0 blend=80",
"FloatShadowThrough guibg=NvimLightGrey4 ctermbg=0 blend=100",
- "Folded guifg=NvimDarkGrey4 guibg=NvimLightGrey3",
+ "Folded guifg=NvimDarkGrey4 guibg=NvimLightGrey1",
"LineNr guifg=NvimLightGrey4",
"MatchParen guibg=NvimLightGrey4 gui=bold cterm=bold,underline",
"ModeMsg guifg=NvimDarkGreen ctermfg=2",
@@ -380,7 +387,7 @@ static const char *highlight_init_light[] = {
"SpellLocal guisp=NvimDarkGreen gui=undercurl cterm=undercurl",
"SpellRare guisp=NvimDarkCyan gui=undercurl cterm=undercurl",
"StatusLine guifg=NvimLightGrey3 guibg=NvimDarkGrey3 cterm=reverse",
- "StatusLineNC guifg=NvimDarkGrey3 guibg=NvimLightGrey3 cterm=bold,underline",
+ "StatusLineNC guifg=NvimDarkGrey2 guibg=NvimLightGrey4 cterm=bold,underline",
"Title guifg=NvimDarkGrey2 gui=bold cterm=bold",
"Visual guibg=NvimLightGrey4 ctermfg=15 ctermbg=0",
"WarningMsg guifg=NvimDarkYellow ctermfg=3",
@@ -441,7 +448,7 @@ static const char *highlight_init_dark[] = {
"ErrorMsg guifg=NvimLightRed ctermfg=9",
"FloatShadow guibg=NvimDarkGrey4 ctermbg=0 blend=80",
"FloatShadowThrough guibg=NvimDarkGrey4 ctermbg=0 blend=100",
- "Folded guifg=NvimLightGrey4 guibg=NvimDarkGrey3",
+ "Folded guifg=NvimLightGrey4 guibg=NvimDarkGrey1",
"LineNr guifg=NvimDarkGrey4",
"MatchParen guibg=NvimDarkGrey4 gui=bold cterm=bold,underline",
"ModeMsg guifg=NvimLightGreen ctermfg=10",
@@ -464,7 +471,7 @@ static const char *highlight_init_dark[] = {
"SpellLocal guisp=NvimLightGreen gui=undercurl cterm=undercurl",
"SpellRare guisp=NvimLightCyan gui=undercurl cterm=undercurl",
"StatusLine guifg=NvimDarkGrey3 guibg=NvimLightGrey3 cterm=reverse",
- "StatusLineNC guifg=NvimLightGrey3 guibg=NvimDarkGrey3 cterm=bold,underline",
+ "StatusLineNC guifg=NvimLightGrey2 guibg=NvimDarkGrey4 cterm=bold,underline",
"Title guifg=NvimLightGrey2 gui=bold cterm=bold",
"Visual guibg=NvimDarkGrey4 ctermfg=0 ctermbg=15",
"WarningMsg guifg=NvimLightYellow ctermfg=11",
@@ -1001,6 +1008,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
{
// If no argument, list current highlighting.
if (!init && ends_excmd((uint8_t)(*line))) {
+ msg_ext_set_kind("list_cmd");
for (int i = 1; i <= highlight_ga.ga_len && !got_int; i++) {
// TODO(brammool): only call when the group has attributes set
highlight_list_one(i);
@@ -1038,6 +1046,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
if (id == 0) {
semsg(_(e_highlight_group_name_not_found_str), line);
} else {
+ msg_ext_set_kind("list_cmd");
highlight_list_one(id);
}
return;
@@ -1885,8 +1894,7 @@ bool syn_list_header(const bool did_header, const int outlen, const int id, bool
if (got_int) {
return true;
}
- msg_outtrans(hl_table[id - 1].sg_name, 0, false);
- name_col = msg_col;
+ msg_col = name_col = msg_outtrans(hl_table[id - 1].sg_name, 0, false);
endcol = 15;
} else if ((ui_has(kUIMessages) || msg_silent) && !force_newline) {
msg_putchar(' ');