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

bug: edgy breaks diffview.nvim layout #76

Closed kevintraver closed 3 months ago

kevintraver commented 6 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.5

Operating system/version

MacOS 14.1

Describe the bug

When using Edgy and Diff View File History, and then selecting an entry using require("diffview.actions").open_in_diffview()

The diffview layout in the new tab is not correct. The layout should be diff2_horizontal (default), but edgy causes the layout to split vertically.

Steps To Reproduce

Expected Behavior

Diffview Layout should remain intact (diff2_horizontal or whatever is configured)

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "sindrets/diffview.nvim",
  "folke/edgy.nvim",
  {
    "folke/edgy.nvim",
    opts = {
      bottom = {
        {
          title = "Diff View File History",
          ft = "DiffviewFileHistory",
        },
      },
    },
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

folke commented 3 months ago

If you're using edgy to manage these windows, then you can't also keep theoriginal layout...

kevintraver commented 3 months ago

Thank you for the explanation.