Can someone help me implement Telescope search layout in Snacks Picker #2741
-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 9 replies
-
|
Related: |
Beta Was this translation helpful? Give feedback.
-
---@module 'snacks'
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
-- NOTE: Keymaps
keys = {
{
"<leader>o",
function()
Snacks.picker.lines({ layout = { preset = "searchy", preview = true }, title = "Current Buffer Fuzzy" })
end,
desc = "Current Buffer Fuzzy",
},
},
---@type snacks.Config
opts = {
picker = {
-- BUG: Not `matchers`
matcher = {
frecency = true,
cwd_bonus = false,
},
layout = {
preset = "telescope",
cycle = false,
},
layouts = {
searchy = {
-- NOTE: Copy from https://github.com/folke/snacks.nvim/blob/fe7cfe9800a182274d0f868a74b7263b8c0c020b/lua/snacks/picker/config/layouts.lua#L106-L125
layout = {
backdrop = false,
row = 1,
width = 0.4,
min_width = 80,
height = 0.8,
border = "none",
box = "vertical",
{ win = "preview", title = "{preview}", height = 0.4, border = true },
{
box = "vertical",
border = true,
title = "{title} {live} {flags}",
title_pos = "center",
{ win = "input", height = 1, border = "bottom" },
{ win = "list", border = "none" },
},
},
},
},
},
},
} |
Beta Was this translation helpful? Give feedback.
-
Missed this
|
Beta Was this translation helpful? Give feedback.
-
|
Few more things:
|
Beta Was this translation helpful? Give feedback.
-
Indentation Issue?
|
Beta Was this translation helpful? Give feedback.
-
|
replace the indentation of 4 in editor to 1 in Preview and list Widow also disable Indent-blankline in Snacks. Check the telescope layout above. Looks Clean. |
Beta Was this translation helpful? Give feedback.




Didn't try hard enough.