Closed isvicy closed 2 months ago
Can you see if you can reproduce the issue with these instructions:
nvim -u repro.lua
in the same directoryI am unable to reproduce the issue.
I can confirm that if i use the reproduction configuration you provided, this issue will not occur.
and the pr i made solve the issue for my case. in this case, i think the issue i met could be introduced by other plugin i used, mostly could be related to autocmds conflicts. i use https://github.com/LazyVim/LazyVim as my base config. i will try to find the root cause in my spare time.
you can make a decision if the pr can be merged just as a precaution.
use this plugin alongside yazi.nvim will reproduce the issue i met. reproduce config:
-- 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)
vim.g.mapleader = " "
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{
"mikavilpas/yazi.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
event = "VeryLazy",
keys = {
{
-- 👇 choose your own keymapping
"<leader>fy",
function()
require("yazi").yazi()
end,
{ desc = "Open the file manager" },
},
},
opts = {
open_for_directories = false,
},
},
{ "zbirenbaum/nvterm", opts = {} },
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
when press q to quit or press enter to open a file in yazi.nvim ui, invalid window id error pops up. here is the detail:
trace
versions:
config: