mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 09:47:57 +02:00
neovim: Close tree if only buffer
This commit is contained in:
parent
3878a636d9
commit
c588b3a0d8
@ -60,6 +60,15 @@
|
|||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = ''
|
||||||
require("nvim-tree").setup()
|
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…
x
Reference in New Issue
Block a user