From a62efa3d961f02ac9ec2295a041b487b2e6d0df6 Mon Sep 17 00:00:00 2001 From: Kyer Potts Date: Wed, 29 Jul 2026 09:40:55 +0800 Subject: [PATCH 1/4] feat: improve active and unused-code highlights --- CHANGELOG.md | 4 ++++ README.md | 1 + doc/vulkanite.txt | 1 + lua/vulkanite/config.lua | 1 + lua/vulkanite/groups/base.lua | 4 +++- lua/vulkanite/groups/integrations/bufferline.lua | 12 ++++++++++++ test/vulkanite_spec.lua | 15 +++++++++++++++ 7 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 lua/vulkanite/groups/integrations/bufferline.lua diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aa6c7e..beeb8ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ release versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Changed + +- Highlight active tabs with the primary blue accent and LSP-tagged unnecessary code with comment grey. + ## [0.1.0] - 2026-07-19 ### Added diff --git a/README.md b/README.md index eb6e977..812d30a 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ Vulkanite automatically detects supported plugins installed through lazy.nvim or - [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) and [blink.cmp](https://github.com/saghen/blink.cmp) - [which-key.nvim](https://github.com/folke/which-key.nvim) - [lazy.nvim](https://github.com/folke/lazy.nvim) +- [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) - [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) and [nvim-tree.lua](https://github.com/nvim-tree/nvim-tree.lua) - [noice.nvim](https://github.com/folke/noice.nvim) and [nvim-notify](https://github.com/rcarriga/nvim-notify) - [snacks.nvim](https://github.com/folke/snacks.nvim) diff --git a/doc/vulkanite.txt b/doc/vulkanite.txt index dc9ba9e..29d58e3 100644 --- a/doc/vulkanite.txt +++ b/doc/vulkanite.txt @@ -143,6 +143,7 @@ gitsigns gitsigns.nvim blink blink.cmp which_key which-key.nvim lazy lazy.nvim + bufferline bufferline.nvim neo_tree neo-tree.nvim nvim_tree nvim-tree.lua noice noice.nvim diff --git a/lua/vulkanite/config.lua b/lua/vulkanite/config.lua index 76aa971..17c6803 100644 --- a/lua/vulkanite/config.lua +++ b/lua/vulkanite/config.lua @@ -7,6 +7,7 @@ M.integration_keys = { "blink", "which_key", "lazy", + "bufferline", "neo_tree", "nvim_tree", "noice", diff --git a/lua/vulkanite/groups/base.lua b/lua/vulkanite/groups/base.lua index f237c5f..9cab762 100644 --- a/lua/vulkanite/groups/base.lua +++ b/lua/vulkanite/groups/base.lua @@ -100,7 +100,7 @@ function M.setup(colors, opts) -- Background fill after tab-page labels. TabLineFill = { fg = colors.ui.gutter, bg = colors.ui.bg_alt }, -- Active tab-page label. - TabLineSel = { fg = colors.diagnostic.ok, bg = colors.ui.bg_alt }, + TabLineSel = { fg = colors.accent.primary, bg = colors.ui.bg_alt }, -- Titles for buffers, quickfix lists, and plugin headings. Title = { fg = colors.accent.primary }, -- Legacy vertical split separator. @@ -201,6 +201,8 @@ function M.setup(colors, opts) DiagnosticHint = { fg = colors.diagnostic.hint }, -- Diagnostic success text from Neovim diagnostics. DiagnosticOk = { fg = colors.diagnostic.ok }, + -- Code marked unnecessary or unused by a diagnostic source. + DiagnosticUnnecessary = { fg = colors.ui.comment }, -- Undercurl for ranges covered by error diagnostics. DiagnosticUnderlineError = { undercurl = true, sp = colors.diagnostic.error }, -- Undercurl for ranges covered by warning diagnostics. diff --git a/lua/vulkanite/groups/integrations/bufferline.lua b/lua/vulkanite/groups/integrations/bufferline.lua new file mode 100644 index 0000000..0f7b219 --- /dev/null +++ b/lua/vulkanite/groups/integrations/bufferline.lua @@ -0,0 +1,12 @@ +local M = {} + +M.url = "https://github.com/akinsho/bufferline.nvim" + +function M.get(colors, opts) + return { + -- Bufferline selected buffer name. + BufferLineBufferSelected = { fg = colors.accent, bold = true, italic = true }, + } +end + +return M diff --git a/test/vulkanite_spec.lua b/test/vulkanite_spec.lua index 2518ac0..22ad8cd 100644 --- a/test/vulkanite_spec.lua +++ b/test/vulkanite_spec.lua @@ -79,6 +79,7 @@ local integration_probe_groups = { "BlinkCmpLabelMatch", "WhichKey", "LazyH1", + "BufferLineBufferSelected", "NeoTreeDirectoryName", "NvimTreeFolderName", "NoiceCmdlinePopup", @@ -191,6 +192,11 @@ local function run() 0x8fe0fa, "CursorLineNr marks the cursor line with the accent" ) + assert_eq( + vim.api.nvim_get_hl(0, { name = "TabLineSel" }).fg, + 0x8fe0fa, + "TabLineSel marks the active tab with the accent" + ) local search_highlight = vim.api.nvim_get_hl(0, { name = "Search", link = false }) assert_eq(search_highlight.fg, 0x151b1e, "Search uses dark text") assert_eq(search_highlight.bg, 0x76c7e3, "Search uses one blue background") @@ -351,6 +357,11 @@ local function run() 0xe03f32, "DiagnosticError uses vivid red" ) + assert_eq( + vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }).fg, + 0x8e969a, + "unnecessary code uses comment grey" + ) assert_eq(vim.api.nvim_get_hl(0, { name = "WarningMsg" }).fg, 0xe0af68, "WarningMsg uses yellow") assert_eq( vim.api.nvim_get_hl(0, { name = "DiagnosticWarn" }).fg, @@ -602,6 +613,10 @@ local function run() assert_unset("WhichKeyFloat", "obsolete which-key group is not defined") assert_unset("SnacksPickerGitHubIssue", "obsolete Snacks GitHub issue group is not defined") assert_eq(vim.api.nvim_get_hl(0, { name = "LazyValue" }).fg, 0xe05f64, "LazyValue uses value red") + local selected_buffer = vim.api.nvim_get_hl(0, { name = "BufferLineBufferSelected" }) + assert_eq(selected_buffer.fg, 0x8fe0fa, "selected bufferline buffer uses the accent") + assert_eq(selected_buffer.bold, true, "selected bufferline buffer remains bold") + assert_eq(selected_buffer.italic, true, "selected bufferline buffer remains italic") assert_eq( vim.api.nvim_get_hl(0, { name = "LspKindUnit" }).fg, 0xe05f64, From 97f347339c1349bd334b0341086b8ec8a2f43f57 Mon Sep 17 00:00:00 2001 From: Kyer Potts Date: Wed, 29 Jul 2026 09:47:15 +0800 Subject: [PATCH 2/4] fix: refine tab and unnecessary color roles --- CHANGELOG.md | 2 +- doc/vulkanite.txt | 2 +- lua/vulkanite/colors.lua | 3 +++ lua/vulkanite/groups/base.lua | 4 ++-- .../groups/integrations/bufferline.lua | 2 +- test/vulkanite_spec.lua | 22 ++++++++++++++++--- 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index beeb8ea..f322972 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ release versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed -- Highlight active tabs with the primary blue accent and LSP-tagged unnecessary code with comment grey. +- Highlight active tabs with the secondary accent and give LSP-tagged unnecessary code its own semantic color. ## [0.1.0] - 2026-07-19 diff --git a/doc/vulkanite.txt b/doc/vulkanite.txt index 29d58e3..a503064 100644 --- a/doc/vulkanite.txt +++ b/doc/vulkanite.txt @@ -196,7 +196,7 @@ UI bg, bg_alt, bg_float, fg, fg_bright, fg_dim, comment, gutter, selection Syntax and accents value, docstring, accent, sky_blue, teal, bright_teal, purple, ok -Diagnostics error, warn, info, hint +Diagnostics error, warn, info, hint, unnecessary Terminal terminal (a 16-entry ANSI color array) `colors.roles` is internal. Override the public keys instead. diff --git a/lua/vulkanite/colors.lua b/lua/vulkanite/colors.lua index 0eb6a91..f44e312 100644 --- a/lua/vulkanite/colors.lua +++ b/lua/vulkanite/colors.lua @@ -42,6 +42,7 @@ local function derive_roles(colors) info = colors.info, hint = colors.hint, ok = colors.ok, + unnecessary = colors.unnecessary, } local diff = { add = colors.ok, @@ -74,6 +75,7 @@ local function derive_roles(colors) info = diagnostic.info, hint = diagnostic.hint, ok = diagnostic.ok, + unnecessary = diagnostic.unnecessary, accent = accent.primary, accent_secondary = accent.secondary, match = accent.match, @@ -102,6 +104,7 @@ local function resolve(opts, apply_overrides) hint = p.muted_blue, selection = p.slate_grey, ok = p.bright_green, + unnecessary = p.comment_grey, accent = p.bright_blue, sky_blue = p.sky_blue, purple = p.purple, diff --git a/lua/vulkanite/groups/base.lua b/lua/vulkanite/groups/base.lua index 9cab762..ed1d9fc 100644 --- a/lua/vulkanite/groups/base.lua +++ b/lua/vulkanite/groups/base.lua @@ -100,7 +100,7 @@ function M.setup(colors, opts) -- Background fill after tab-page labels. TabLineFill = { fg = colors.ui.gutter, bg = colors.ui.bg_alt }, -- Active tab-page label. - TabLineSel = { fg = colors.accent.primary, bg = colors.ui.bg_alt }, + TabLineSel = { fg = colors.accent.secondary, bg = colors.ui.bg_alt }, -- Titles for buffers, quickfix lists, and plugin headings. Title = { fg = colors.accent.primary }, -- Legacy vertical split separator. @@ -202,7 +202,7 @@ function M.setup(colors, opts) -- Diagnostic success text from Neovim diagnostics. DiagnosticOk = { fg = colors.diagnostic.ok }, -- Code marked unnecessary or unused by a diagnostic source. - DiagnosticUnnecessary = { fg = colors.ui.comment }, + DiagnosticUnnecessary = { fg = colors.diagnostic.unnecessary }, -- Undercurl for ranges covered by error diagnostics. DiagnosticUnderlineError = { undercurl = true, sp = colors.diagnostic.error }, -- Undercurl for ranges covered by warning diagnostics. diff --git a/lua/vulkanite/groups/integrations/bufferline.lua b/lua/vulkanite/groups/integrations/bufferline.lua index 0f7b219..98999ea 100644 --- a/lua/vulkanite/groups/integrations/bufferline.lua +++ b/lua/vulkanite/groups/integrations/bufferline.lua @@ -5,7 +5,7 @@ M.url = "https://github.com/akinsho/bufferline.nvim" function M.get(colors, opts) return { -- Bufferline selected buffer name. - BufferLineBufferSelected = { fg = colors.accent, bold = true, italic = true }, + BufferLineBufferSelected = { fg = colors.accent_secondary, bold = true, italic = true }, } end diff --git a/test/vulkanite_spec.lua b/test/vulkanite_spec.lua index 22ad8cd..9652243 100644 --- a/test/vulkanite_spec.lua +++ b/test/vulkanite_spec.lua @@ -194,8 +194,8 @@ local function run() ) assert_eq( vim.api.nvim_get_hl(0, { name = "TabLineSel" }).fg, - 0x8fe0fa, - "TabLineSel marks the active tab with the accent" + 0x4fa3a6, + "TabLineSel marks the active tab with the secondary accent" ) local search_highlight = vim.api.nvim_get_hl(0, { name = "Search", link = false }) assert_eq(search_highlight.fg, 0x151b1e, "Search uses dark text") @@ -350,6 +350,11 @@ local function run() "#e03f32", "diagnostic role is derived centrally" ) + assert_eq( + semantic_colors.roles.diagnostic.unnecessary, + "#8e969a", + "unnecessary diagnostic role is derived centrally" + ) assert_eq(semantic_colors.roles.accent.icon, "#9083B9", "icon role is derived centrally") assert_eq(vim.api.nvim_get_hl(0, { name = "ErrorMsg" }).fg, 0xe03f32, "ErrorMsg uses vivid red") assert_eq( @@ -520,6 +525,7 @@ local function run() require("vulkanite").load({ on_colors = function(colors) colors.error = "#ff0000" + colors.unnecessary = "#808080" end, on_highlights = function(groups, colors) groups.VulkaniteOverrideProbe = { fg = colors.error } @@ -535,6 +541,11 @@ local function run() 0xff0000, "on_highlights sees colors" ) + assert_eq( + vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }).fg, + 0x808080, + "on_colors mutates unnecessary diagnostics independently" + ) require("vulkanite").load({}) assert_unset("VulkaniteOverrideProbe", "reload clears callback-defined highlights") assert_eq( @@ -542,6 +553,11 @@ local function run() 0xe03f32, "reload restores default semantic colors" ) + assert_eq( + vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }).fg, + 0x8e969a, + "reload restores the default unnecessary color" + ) reset_vulkanite() require("vulkanite").load({ @@ -614,7 +630,7 @@ local function run() assert_unset("SnacksPickerGitHubIssue", "obsolete Snacks GitHub issue group is not defined") assert_eq(vim.api.nvim_get_hl(0, { name = "LazyValue" }).fg, 0xe05f64, "LazyValue uses value red") local selected_buffer = vim.api.nvim_get_hl(0, { name = "BufferLineBufferSelected" }) - assert_eq(selected_buffer.fg, 0x8fe0fa, "selected bufferline buffer uses the accent") + assert_eq(selected_buffer.fg, 0x4fa3a6, "selected bufferline buffer uses the secondary accent") assert_eq(selected_buffer.bold, true, "selected bufferline buffer remains bold") assert_eq(selected_buffer.italic, true, "selected bufferline buffer remains italic") assert_eq( From b0278dc95c819b1a5f786b7555496c28eedace68 Mon Sep 17 00:00:00 2001 From: Kyer Potts Date: Wed, 29 Jul 2026 10:20:32 +0800 Subject: [PATCH 3/4] fix: quiet unnecessary diagnostics --- CHANGELOG.md | 2 +- lua/vulkanite/colors.lua | 2 +- lua/vulkanite/groups/base.lua | 2 +- test/vulkanite_spec.lua | 12 +++++------- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f322972..d724a9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ release versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed -- Highlight active tabs with the secondary accent and give LSP-tagged unnecessary code its own semantic color. +- Highlight active tabs with the secondary accent and render LSP-tagged unnecessary code in subdued slate grey without undercurls. ## [0.1.0] - 2026-07-19 diff --git a/lua/vulkanite/colors.lua b/lua/vulkanite/colors.lua index f44e312..4a12856 100644 --- a/lua/vulkanite/colors.lua +++ b/lua/vulkanite/colors.lua @@ -104,7 +104,7 @@ local function resolve(opts, apply_overrides) hint = p.muted_blue, selection = p.slate_grey, ok = p.bright_green, - unnecessary = p.comment_grey, + unnecessary = p.slate_grey, accent = p.bright_blue, sky_blue = p.sky_blue, purple = p.purple, diff --git a/lua/vulkanite/groups/base.lua b/lua/vulkanite/groups/base.lua index ed1d9fc..418a307 100644 --- a/lua/vulkanite/groups/base.lua +++ b/lua/vulkanite/groups/base.lua @@ -202,7 +202,7 @@ function M.setup(colors, opts) -- Diagnostic success text from Neovim diagnostics. DiagnosticOk = { fg = colors.diagnostic.ok }, -- Code marked unnecessary or unused by a diagnostic source. - DiagnosticUnnecessary = { fg = colors.diagnostic.unnecessary }, + DiagnosticUnnecessary = { fg = colors.diagnostic.unnecessary, nocombine = true }, -- Undercurl for ranges covered by error diagnostics. DiagnosticUnderlineError = { undercurl = true, sp = colors.diagnostic.error }, -- Undercurl for ranges covered by warning diagnostics. diff --git a/test/vulkanite_spec.lua b/test/vulkanite_spec.lua index 9652243..a9313ec 100644 --- a/test/vulkanite_spec.lua +++ b/test/vulkanite_spec.lua @@ -352,7 +352,7 @@ local function run() ) assert_eq( semantic_colors.roles.diagnostic.unnecessary, - "#8e969a", + "#5c6370", "unnecessary diagnostic role is derived centrally" ) assert_eq(semantic_colors.roles.accent.icon, "#9083B9", "icon role is derived centrally") @@ -362,11 +362,9 @@ local function run() 0xe03f32, "DiagnosticError uses vivid red" ) - assert_eq( - vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }).fg, - 0x8e969a, - "unnecessary code uses comment grey" - ) + local unnecessary_highlight = vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }) + assert_eq(unnecessary_highlight.fg, 0x5c6370, "unnecessary code uses slate grey") + assert_eq(unnecessary_highlight.nocombine, true, "unnecessary code suppresses undercurls") assert_eq(vim.api.nvim_get_hl(0, { name = "WarningMsg" }).fg, 0xe0af68, "WarningMsg uses yellow") assert_eq( vim.api.nvim_get_hl(0, { name = "DiagnosticWarn" }).fg, @@ -555,7 +553,7 @@ local function run() ) assert_eq( vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }).fg, - 0x8e969a, + 0x5c6370, "reload restores the default unnecessary color" ) From fb90247e398cdc0ad2d3419d4c14cc6165c0a69c Mon Sep 17 00:00:00 2001 From: Kyer Potts Date: Wed, 29 Jul 2026 10:25:53 +0800 Subject: [PATCH 4/4] fix: preserve syntax styles on unnecessary code --- CHANGELOG.md | 2 +- lua/vulkanite/groups/base.lua | 2 +- test/vulkanite_spec.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d724a9b..8f70bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ release versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed -- Highlight active tabs with the secondary accent and render LSP-tagged unnecessary code in subdued slate grey without undercurls. +- Highlight active tabs with the secondary accent and render LSP-tagged unnecessary code in subdued slate grey. ## [0.1.0] - 2026-07-19 diff --git a/lua/vulkanite/groups/base.lua b/lua/vulkanite/groups/base.lua index 418a307..ed1d9fc 100644 --- a/lua/vulkanite/groups/base.lua +++ b/lua/vulkanite/groups/base.lua @@ -202,7 +202,7 @@ function M.setup(colors, opts) -- Diagnostic success text from Neovim diagnostics. DiagnosticOk = { fg = colors.diagnostic.ok }, -- Code marked unnecessary or unused by a diagnostic source. - DiagnosticUnnecessary = { fg = colors.diagnostic.unnecessary, nocombine = true }, + DiagnosticUnnecessary = { fg = colors.diagnostic.unnecessary }, -- Undercurl for ranges covered by error diagnostics. DiagnosticUnderlineError = { undercurl = true, sp = colors.diagnostic.error }, -- Undercurl for ranges covered by warning diagnostics. diff --git a/test/vulkanite_spec.lua b/test/vulkanite_spec.lua index a9313ec..35b3cc5 100644 --- a/test/vulkanite_spec.lua +++ b/test/vulkanite_spec.lua @@ -364,7 +364,7 @@ local function run() ) local unnecessary_highlight = vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }) assert_eq(unnecessary_highlight.fg, 0x5c6370, "unnecessary code uses slate grey") - assert_eq(unnecessary_highlight.nocombine, true, "unnecessary code suppresses undercurls") + assert_eq(unnecessary_highlight.nocombine, nil, "unnecessary code preserves syntax styles") assert_eq(vim.api.nvim_get_hl(0, { name = "WarningMsg" }).fg, 0xe0af68, "WarningMsg uses yellow") assert_eq( vim.api.nvim_get_hl(0, { name = "DiagnosticWarn" }).fg,