-
When I have several splits (created with C-w s, C-w v), is it possible to choose on explorer where to open the file? On nvim-tree, if a split is present, you're prompted to choose a window on 'where' to open the selected file, like this: An overlay is shown on each window to name it. Is it (yet) possible to have this behavior with Snacks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Just press |
Beta Was this translation helpful? Give feedback.
-
I am also on Linux / Wayland. Got it to work by binding it to O
|
Beta Was this translation helpful? Give feedback.
-
❓ Type mismatch: ["O"] = { { "pick_win", "jump" }, mode = { "n", "i" } }, -- Type mismatch, see `snacks.win.Keys` ✅ This works but feels a bit odd: ["O"] = { "O", { "pick_win", "jump" }, mode = { "n", "i" } }, -- Key duplication is required ✅ No types: ---@diagnostic disable-next-line: assign-type-mismatch
["O"] = { { "pick_win", "jump" }, mode = { "n", "i" } }, ⛔ This seems correct, but it doesn’t work: ["O"] = { nil, { "O", "jump" }, mode = { "n", "i" } }, |
Beta Was this translation helpful? Give feedback.
-
Yes, Thanks to all who help me debug this issue. Answering my own question, as pointed by TimothyKrell. This is how an override should be applied: https://github.com/LionyxML/dotneovim/blob/03bf4b5cab5286f45db9d19a21104265e841ab0d/init.lua#L108 Basically: require("lazy").setup({
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
explorer = { enabled = true }, -- NOT HERE!
picker = {
enabled = true,
sources = {
explorer = { -- HERE!
enabled = true,
hidden = true,
auto_close = false,
win = {
list = {
keys = {
["O"] = { { "pick_win", "jump" }, mode = { "n", "i" } },
},
},
},
},
},
},
... |
Beta Was this translation helpful? Give feedback.
-
I fixed this in WezTerm by adding this to the $HOME/.wezterm.lua file: local wezterm = require("wezterm") |
Beta Was this translation helpful? Give feedback.
Yes,
<S-Enter>
is the way, but it may play tricks depending on your window manager / terminal config, so you may want to rebind it, to, let's say 'O'.Thanks to all who help me debug this issue.
Answering my own question, as pointed by TimothyKrell.
This is how an override should be applied: https://github.com/LionyxML/dotneovim/blob/03bf4b5cab5286f45db9d19a21104265e841ab0d/init.lua#L108
Basically: