mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-04-23 02:38:56 +02: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 = ''
|
config = ''
|
||||||
require("nvim-tree").setup()
|
require("nvim-tree").setup()
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd({"QuitPre"}, {
|
||||||
nested = true,
|
callback = function() vim.cmd("NvimTreeClose") end
|
||||||
callback = function()
|
|
||||||
if #vim.api.nvim_list_wins() == 1 and require("nvim-tree.utils").is_nvim_tree_buf() then
|
|
||||||
vim.cmd "quit"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
local function open_nvim_tree(data)
|
local function open_nvim_tree(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user