mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-26 12:15:35 +02:00
plugins/utils/nvim-tree: change implementation of autoClose
This commit is contained in:
parent
d0910a6ddb
commit
7a354187cb
1 changed files with 8 additions and 1 deletions
|
@ -217,7 +217,6 @@ in
|
||||||
hijack_netrw = cfg.hijackNetrw;
|
hijack_netrw = cfg.hijackNetrw;
|
||||||
open_on_setup = cfg.openOnSetup;
|
open_on_setup = cfg.openOnSetup;
|
||||||
ignore_ft_on_setup = cfg.ignoreFtOnSetup;
|
ignore_ft_on_setup = cfg.ignoreFtOnSetup;
|
||||||
auto_close = cfg.autoClose;
|
|
||||||
open_on_tab = cfg.openOnTab;
|
open_on_tab = cfg.openOnTab;
|
||||||
hijack_cursor = cfg.hijackCursor;
|
hijack_cursor = cfg.hijackCursor;
|
||||||
update_cwd = cfg.updateCwd;
|
update_cwd = cfg.updateCwd;
|
||||||
|
@ -261,6 +260,14 @@ in
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
];
|
];
|
||||||
|
|
||||||
|
autoCmd = mkIf cfg.autoClose [
|
||||||
|
{
|
||||||
|
event = "BufEnter";
|
||||||
|
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif";
|
||||||
|
nested = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require('nvim-tree').setup(${helpers.toLuaObject options})
|
require('nvim-tree').setup(${helpers.toLuaObject options})
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue