diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aa6c7e..8f70bd8 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 secondary accent and render LSP-tagged unnecessary code in subdued slate 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..a503064 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 @@ -195,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..4a12856 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.slate_grey, accent = p.bright_blue, sky_blue = p.sky_blue, purple = p.purple, 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..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.diagnostic.ok, 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. @@ -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.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 new file mode 100644 index 0000000..98999ea --- /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_secondary, bold = true, italic = true }, + } +end + +return M diff --git a/test/vulkanite_spec.lua b/test/vulkanite_spec.lua index 2518ac0..35b3cc5 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, + 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") assert_eq(search_highlight.bg, 0x76c7e3, "Search uses one blue background") @@ -344,6 +350,11 @@ local function run() "#e03f32", "diagnostic role is derived centrally" ) + assert_eq( + semantic_colors.roles.diagnostic.unnecessary, + "#5c6370", + "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( @@ -351,6 +362,9 @@ local function run() 0xe03f32, "DiagnosticError uses vivid red" ) + 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, 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, @@ -509,6 +523,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 } @@ -524,6 +539,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( @@ -531,6 +551,11 @@ local function run() 0xe03f32, "reload restores default semantic colors" ) + assert_eq( + vim.api.nvim_get_hl(0, { name = "DiagnosticUnnecessary" }).fg, + 0x5c6370, + "reload restores the default unnecessary color" + ) reset_vulkanite() require("vulkanite").load({ @@ -602,6 +627,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, 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( vim.api.nvim_get_hl(0, { name = "LspKindUnit" }).fg, 0xe05f64,