How to set a unique highlight group for a specific picker? #2140
-
Beta Was this translation helpful? Give feedback.
Answered by
drowning-cat
Aug 21, 2025
Replies: 2 comments 2 replies
-
You can’t do that using In particular, snacks.nvim/lua/snacks/picker/core/input.lua Lines 19 to 49 in bc0630e |
Beta Was this translation helpful? Give feedback.
1 reply
-
Actually, you can use this: opts = {
picker = {
sources = {
explorer = {
-- https://github.com/folke/snacks.nvim/blob/bc0630e43be5699bb94dadc302c0d21615421d93/lua/snacks/picker/config/layouts.lua#L22-L42
layout = {
preview = 'main',
layout = {
backdrop = false,
width = 40,
min_width = 40,
height = 0,
position = 'left',
border = 'none',
box = 'vertical',
{
win = 'input',
height = 1,
wo = {
-- Snacks.picker.highlight.winhl('SnacksPickerInput')
-- Use full string:
-- FloatBorder:SnacksPickerInputBorder,FloatFooter:SnacksPickerInputFooter,FloatTitle:SnacksPickerInputTitle,NormalFloat:SnacksPickerInput,CursorLine:SnacksPickerInputCursorLine
winhighlight = 'FloatBorder:Special',
},
border = 'rounded',
title = '{title} {live} {flags}',
title_pos = 'center',
},
{ win = 'list', border = 'none' },
{ win = 'preview', title = '{preview}', height = 0.4, border = 'top' },
},
}, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
KaihoCD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually, you can use this: