Closed CMOISDEAD closed 2 months ago
Thanks for the issue!
Unfortunately, I can not reproduce with the following setup:
require('mini.files').setup()
vim.keymap.set('n', '<Leader>et', function()
if not require('mini.files').close() then require('mini.files').open() end
end)
Executing <Leader>et
toggles explorer (closes if shown, opens if not shown). Also opens it if explorer was previously closed with q
.
I am pretty confident that this is not an issue with 'mini.files'. If anything, it looks like this config loads 'neo-tree.nvim' which has <Leader>e
mapping defined in AstroNvim. So <Leader>e
toggles 'mini.files' only once after which it seems to be overridden to toggle Neo-tree.
Thank you very much, you are right, I just tested it again with a clean version of nvim and the problem does not appear, however with a newly installed version of astronvim the problem occurs.
Contributing guidelines
Module(s)
mini.files
Description
I've bound
<leader>e
to the functionif not require("mini.files").close() then require("mini.files").open() end
. This opensmini.files
when I press these keys. However, if I exit using theq
key after opening it for the first time or after resetting with<BS>
, it sometimes doesn't open again when I press<leader>e
or using commands. This issue doesn't happen every time, but it's not uncommon.I'm using AstroNvim, but there doesn't seem to be any other plugin interfering with the functionality of mini.files.
The following is my
mini-files.lua
configurationNeovim version
v0.10.1
Steps to reproduce
if not require("mini.files").close() then require("mini.files").open() end
Expected behavior
mini.files opens correctly no matter how I close it.
Actual behavior
Frequently, mini.files stops functioning if I exit with the q key. It requires restarting Neovim to regain functionality.