nvim: dim the minuet ghost text below comment brightness
minuet links MinuetVirtualText -> Comment, which in vague is #606079 -- the same colour as real comments, so a suggestion reads as if it were already part of the file. Dropped to #4a4a5c, between Comment and Whitespace (#333738). ⚠ Re-applied on ColorScheme. Loading a colourscheme runs , which drops custom groups, so setting this once at startup works until the first :colorscheme and then silently stops. The reference values for the palette are in the comment so the number can be tuned without going and looking them up again.
This commit is contained in:
1 parent
c01345b216
commit
eb21ceb561
1 file changed
+25
@@ -231,6 +231,31 @@ minuet.setup({
|
||||
})
|
||||
end
|
||||
|
||||
-- Ghost text, dimmer than a comment.
|
||||
--
|
||||
-- minuet links MinuetVirtualText -> Comment, which in `vague` is #606079 --
|
||||
-- the same colour as real comments, so a suggestion reads as if it were
|
||||
-- already part of the file. This drops it toward the background.
|
||||
--
|
||||
-- Reference points in this colourscheme, for tuning:
|
||||
-- Normal #cdcdcd (actual code)
|
||||
-- Comment #606079 (minuet's default -- too prominent)
|
||||
-- MINUET #4a4a5c <- here
|
||||
-- Whitespace #333738 (about as dim as stays legible)
|
||||
--
|
||||
-- ⚠ MUST be re-applied on ColorScheme. Loading a colourscheme runs
|
||||
-- `highlight clear`, which drops custom groups -- so setting this once at
|
||||
-- startup works until the first `:colorscheme` and then silently stops.
|
||||
local MINUET_FG = "#4a4a5c"
|
||||
local function minuet_highlight()
|
||||
vim.api.nvim_set_hl(0, "MinuetVirtualText", { fg = MINUET_FG, italic = true })
|
||||
end
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
group = vim.api.nvim_create_augroup("MinuetHighlight", { clear = true }),
|
||||
callback = minuet_highlight,
|
||||
})
|
||||
minuet_highlight()
|
||||
|
||||
-- Registered UNCONDITIONALLY, so it can report the case where the plugin
|
||||
-- itself is missing. A status command that only exists when everything
|
||||
-- already works is not a status command.
|
||||
|
||||
Reference in new issue
Block a user