snacks.picker: override highlight groups when usiung neovim default colorscheme #1940
armyers
started this conversation in
Show and tell
Replies: 1 comment 8 replies
-
vim.api.nvim_create_autocmd("User", {
pattern = "LazyDone",
group = vim.api.nvim_create_augroup("override_picker_hl", { clear = true }),
callback = function()
vim.api.nvim_set_hl(0, "SnacksPickerFile", { link = "Text" })
vim.api.nvim_set_hl(0, "SnacksPickerDir", { link = "Comment" })
vim.api.nvim_set_hl(0, "SnacksPickerPathHidden", { link = "Comment" })
vim.api.nvim_set_hl(0, "SnacksPickerPathIgnored", { link = "Comment" })
vim.api.nvim_set_hl(0, "SnacksPickerGitStatusUntracked", { link = "Special" })
end,
})
-- Or
-- vim.api.nvim_create_autocmd("ColorScheme", {
-- group = vim.api.nvim_create_augroup("override_picker_hl", { clear = true }),
-- callback = function()
-- vim.api.nvim_set_hl(0, "SnacksPickerFile", { link = "Text" })
-- vim.api.nvim_set_hl(0, "SnacksPickerDir", { link = "Comment" })
-- vim.api.nvim_set_hl(0, "SnacksPickerPathHidden", { link = "Comment" })
-- vim.api.nvim_set_hl(0, "SnacksPickerPathIgnored", { link = "Comment" })
-- vim.api.nvim_set_hl(0, "SnacksPickerGitStatusUntracked", { link = "Special" })
-- end,
-- })
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "default",
},
},
} |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I've seen other posts describing how to override snacks.picker highlight groups, but they all seem to apply to the case when you're using a colorscheme plugin, not the neovim default colorscheme, which is my choice, so the suggestion to override the highlight groups in my colorscheme plugin spec wasn't available to me, I guess. I used this
hack
, instead:looks like a hack, smells like a hack, ... right? Full disclosure, It probably is a hack since I got this from chatgpt. :/
If someone has a more
proper
way to do this, I love to know.Beta Was this translation helpful? Give feedback.
All reactions