mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
neovim: Close tree if only buffer
This commit is contained in:
parent
3878a636d9
commit
c588b3a0d8
@ -60,6 +60,15 @@
|
||||
type = "lua";
|
||||
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
|
||||
})
|
||||
'';
|
||||
}
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user