folke / edgy.nvim

Easily create and manage predefined window layouts, bringing a new edge to your workflow
Apache License 2.0
840 stars 17 forks source link

feat(commands): add on_open callbacks and restore focus on last window #94

Closed GustavoKatel closed 3 months ago

GustavoKatel commented 3 months ago

What is this PR for?

This is what I have in my config right now:

require("edgy").toggle({ focus = false, on_open = function()
    vim.cmd("wincmd =")
end })

Does this PR fix an existing issue?

https://github.com/folke/edgy.nvim/discussions/71

folke commented 3 months ago

Edgy doesn't set focus. You can easily choose a window yourself after opening edgy in vim.schedule.

vim.cmd("wincmd =") will also cause issues btw..