[Picker] Disable options inside the preview buffer #523
Answered
by
minusfive
ahmedelgabri
asked this question in
Q&A
-
Preview bufferI'd like to disable This works, but then vim.api.nvim_create_autocmd('FileType', {
pattern = 'snacks_picker_preview',
callback = function()
vim.opt_local.signcolumn = 'auto'
vim.opt_local.statuscolumn = ''
-- No effect
vim.opt_local.number = false
vim.opt_local.relativenumber = false
end,
}) |
Beta Was this translation helpful? Give feedback.
Answered by
minusfive
Jan 19, 2025
Replies: 1 comment 6 replies
-
You can easily accomplish this using the opts = {
picker = {
win = { -- Global
preview = {
wo = {
foldcolumn = "0",
number = false,
relativenumber = false,
signcolumn = "no",
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
ahmedelgabri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can easily accomplish this using the
win
option, it's in the docs. Use the top-level one to apply it to all pickers, under a layout to affect only that specific layout, or under a source to affect only that source/picker. E.g.: