mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-17 02:00:50 +01:00
neovim: Close tree with QuitPre
This fixes an issue where neovim would automatically close when opening it with a directory.
This commit is contained in:
parent
02dd4540e5
commit
c59387bb1f
@ -61,13 +61,8 @@
|
||||
config = ''
|
||||
require("nvim-tree").setup()
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
nested = true,
|
||||
callback = function()
|
||||
if #vim.api.nvim_list_wins() == 1 and require("nvim-tree.utils").is_nvim_tree_buf() then
|
||||
vim.cmd "quit"
|
||||
end
|
||||
end
|
||||
vim.api.nvim_create_autocmd({"QuitPre"}, {
|
||||
callback = function() vim.cmd("NvimTreeClose") end
|
||||
})
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
|
Loading…
Reference in New Issue
Block a user