From 714007013b2824ce819a700a63eca7ec5035b198 Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Tue, 11 Feb 2025 15:23:05 +0100 Subject: [PATCH] fix(nvim): seeral fixes to bsolarized theme --- nvim/.config/nvim/colors/bsolarized2.lua | 61 +++++++++++++++++++----- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/nvim/.config/nvim/colors/bsolarized2.lua b/nvim/.config/nvim/colors/bsolarized2.lua index 82739f9..4c8b64a 100644 --- a/nvim/.config/nvim/colors/bsolarized2.lua +++ b/nvim/.config/nvim/colors/bsolarized2.lua @@ -78,6 +78,7 @@ function highlight(opts) histr = "highlight! clear " .. opts.name end + vim.api.nvim_set_hl(0, opts.name, { }) vim.cmd(histr) end @@ -94,14 +95,14 @@ local colors = { base1 = { "14", "#93a1a1" }, base2 = { "7", "#eee8d5" }, base3 = { "15", "#fdf6e3" }, - yellow = { "3", "#859900" }, - orange = { "9", "#b58900" }, - red = { "1", "#cb4b16" }, - magenta = { "5", "#dc322f" }, - violet = { "13", "#d33682" }, - blue = { "4", "#6c71c4" }, - cyan = { "6", "#268bd2" }, - green = { "2", "#2aa198" }, + yellow = { "3", "#b58900" }, + orange = { "9", "#cb4b16" }, + red = { "1", "#dc322f" }, + magenta = { "5", "#d33682" }, + violet = { "13", "#6c71c4" }, + blue = { "4", "#268bd2" }, + cyan = { "6", "#2aa198" }, + green = { "2", "#859900" }, none = { "NONE", "NONE" }, back = { "8", "#002b36" }, } @@ -202,10 +203,10 @@ highlight {name="SignColumn", link="LineNr"} -- IncSearch 'incsearch' highlighting; also used for the text replaced -- with ":s///c" -highlight {name="IncSearch", link="Search"} +highlight {name="IncSearch", fg=colors.yellow} -- Substitute |:substitute| replacement text highlighting -highlight {name="Substitute", link="Search"} +highlight {name="Substitute", fg=colors.yellow} -- LineNr Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. highlight {name="LineNr", fg=colors.base01, bg=colors.base02, attrs={attrs.none}} @@ -274,7 +275,7 @@ highlight {name="Question", fg=colors.cyan, bg=colors.none, attrs={attrs.bold}} -- Search Last search pattern highlighting (see 'hlsearch'). Also -- used for similar items that need to stand out. -highlight {name="Search", bg=colors.yellow} +highlight {name="Search", bg=colors.yellow, fg=colors.base3} -- SpecialKey Unprintable characters: text displayed differently from -- what it really is. But not 'listchars' whitespace. |hl-Whitespace| @@ -326,6 +327,10 @@ highlight {name="WarningMsg", fg=colors.red, bg=colors.none, attrs={attrs.bold}} -- WildMenu current match in 'wildmenu' completion highlight {name="WildMenu", fg=colors.base2, bg=colors.base02, attrs={attrs.reverse}} + + +highlight {name="Changed", fg=colors.yellow} + -- ---------------------------------------------------------------------- -- Syntax groups -- ---------------------------------------------------------------------- @@ -340,11 +345,13 @@ highlight {name="Comment", fg=colors.base01, attrs={attrs.italic}} -- Boolean a boolean constant: TRUE, false -- Float a floating point constant: 2.3e10 highlight {name="Constant", fg=colors.cyan} +highlight {name="String", fg=colors.cyan} -- *Identifier any variable name -- Function function name (also: methods for classes) clear_highlight "Identifier" highlight {name="Identifier", fg=colors.blue} +highlight {name="Function", fg=colors.blue} -- *Statement any statement -- Conditional if, then, else, endif, switch, etc. @@ -354,6 +361,7 @@ highlight {name="Identifier", fg=colors.blue} -- Keyword any other keyword -- Exception try, catch, throw highlight {name="Statement", fg=colors.green} +highlight {name="Operator", fg=colors.red} -- *PreProc generic Preprocessor -- Include preprocessor #include @@ -375,6 +383,7 @@ highlight {name="Type", fg=colors.yellow, attrs={attrs.bold}} -- SpecialComment special things inside a comment -- Debug debugging statements highlight {name="Special", fg=colors.red} +highlight {name="Delimiter", fg=colors.red} -- *Underlined text that stands out, HTML links highlight {name="Underlined", fg=colors.violet} @@ -391,6 +400,16 @@ highlight {name="Todo", fg=colors.magenta, bg=colors.none, attrs={attrs.bold}} +-- ---------------------------------------------------------------------- +-- Semantic tokens +-- ---------------------------------------------------------------------- + +highlight {name="DiagnosticInfo", fg=colors.blue} +highlight {name="DiagnosticWarn", fg=colors.yellow} +highlight {name="DiagnosticError", fg=colors.red} + + + -- ---------------------------------------------------------------------- -- Semantic tokens -- ---------------------------------------------------------------------- @@ -398,7 +417,7 @@ highlight {name="Todo", fg=colors.magenta, bg=colors.none, attrs={attrs.bold}} highlight {name = "@lsp.type.namespace", fg=colors.base0 } highlight {name = "@lsp.type.parameter", fg=colors.magenta } highlight {name = "@lsp.type.variable", fg=colors.blue, attrs={attrs.italic} } -highlight {name = "@lsp.type.function", fg=colors.blue } +highlight {name = "@lsp.type.function", link="Function" } highlight {name = "@lsp.type.method", link="Function" } highlight {name = "@lsp.mod.readonly", fg=colors.orange} @@ -421,6 +440,7 @@ highlight {name="NvimTreeOpenedFile", attrs={attrs.bold}} highlight {name="NvimTreeSpecialFile", fg=colors.magenta} highlight {name="NvimTreeImageFile", fg=colors.cyan} highlight {name="NvimTreeIndentMarker", fg=colors.base01} +highlight {name="NvimTreeExpander", fg=colors.base01} highlight {name="NvimTreeGitDirty", fg=colors.yellow, attrs={attrs.bold}} highlight {name="NvimTreeGitStaged", fg=colors.green, attrs={attrs.bold}} @@ -430,3 +450,20 @@ highlight {name="NvimTreeGitNew", fg=colors.green, attrs={attrs.bold}} highlight {name="NvimTreeGitDeleted", fg=colors.red, attrs={attrs.strike}} --highlight {name="NvimTreeWindowPicker", link=""} + + +-- ---------------------------------------------------------------------- +-- NeoTree syntax +-- ---------------------------------------------------------------------- + +highlight {name="NeoTreeIndentMarker", fg=colors.base01} +highlight {name="NeoTreeExpander", link="NeoTreeIndentMarker"} + + +-- ---------------------------------------------------------------------- +-- Goc +-- ---------------------------------------------------------------------- + +highlight {name="GocNormal", link="Comment"} +highlight {name="GocCovered", fg=colors.green, attrs={attrs.bold}} +highlight {name="GocUncovered", fg=colors.red, attrs={attrs.bold}}