mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
plugins/utils/nvim-tree: change implementation of autoClose (#125)
This commit is contained in:
parent
55ed602814
commit
1480ffe201
1 changed files with 8 additions and 1 deletions
|
@ -223,7 +223,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;
|
||||||
|
@ -267,6 +266,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