nvim: Add option switch to italicize/normalize comments

This commit is contained in:
Marty Oehme 2025-06-12 10:13:52 +02:00
parent 43ae4ea7d4
commit 3f4c057ffe
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -289,6 +289,22 @@ return {
end, end,
desc = "floating file browser", desc = "floating file browser",
}, },
{
"[oi",
function()
local c = vim.api.nvim_get_hl(0, { name = "Comment" })
vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", c, { italic = false }))
end,
desc = "no italic comments",
},
{
"]oi",
function()
local c = vim.api.nvim_get_hl(0, { name = "Comment" })
vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", {}, c, { italic = true }))
end,
desc = "italic comments",
},
}, },
}, },
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, .. -- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..