Replies: 2 comments
-
this should help: #94 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I just had the literally exact same issue. I managed to get it fixed by scheduling a focus change in my keybind to open the sidebar. Here's a link to the relevant code in my edgy config to set the focus to the file tree. And a minimal snip of the relevant code: return {
"folke/edgy.nvim",
keys = {
{ -- toggle the right sidebar tree nav
"<Leader>pl",
function()
require("lazy").load({ plugins = { "neo-tree.nvim" } })
require("edgy").toggle("right")
-- focus the file tree pane after opening
vim.schedule(function()
local all_win_ids = vim.api.nvim_list_wins()
local edgy = require("edgy")
-- Iterate over each window ID
for _, win_id in ipairs(all_win_ids) do
-- Get the Edgy.Window object for the current window ID
local win = edgy.get_win(win_id)
-- If the window exists in edgy and is the "Files" window, focus it
if win and win.view.get_title() == "Files" then
vim.api.nvim_set_current_win(win_id)
end
end
end)
end,
desc = "Panes: Right (toggle)",
},
},
-- ... other config options
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! I am looking for the ability to choose a focus a specific window when opening an edge bar. Currently is seems like when opening an edge bar the focus is on the last window.
E.g. I have the left edgebar configured with three pinned windows in the order Neotree filesystem, buffers and git status. When I call the api
require("edgy").open("left")
the sidebar opens all 3 pinned windows and the focus is on the last window Neotree git status. However, I would like to focus on the first window, Neotree filesystem.Any ideas on how I can achieve this? 🙏
Beta Was this translation helpful? Give feedback.
All reactions