mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-15 15:12:36 +02:00
Merge branch 'main' into lib
This commit is contained in:
commit
8748b953c3
58 changed files with 2871 additions and 419 deletions
|
@ -19,7 +19,7 @@ in
|
|||
];
|
||||
|
||||
options.plugins.nvim-tree = {
|
||||
enable = mkEnableOption "Enable nvim-tree";
|
||||
enable = mkEnableOption "nvim-tree";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
|
@ -234,7 +234,6 @@ in
|
|||
hijack_netrw = cfg.hijackNetrw;
|
||||
open_on_setup = cfg.openOnSetup;
|
||||
ignore_ft_on_setup = cfg.ignoreFtOnSetup;
|
||||
auto_close = cfg.autoClose;
|
||||
open_on_tab = cfg.openOnTab;
|
||||
hijack_cursor = cfg.hijackCursor;
|
||||
sync_root_with_cwd = cfg.syncRootWithCwd;
|
||||
|
@ -278,6 +277,14 @@ in
|
|||
nvim-web-devicons
|
||||
];
|
||||
|
||||
autoCmd = mkIf (cfg.autoClose != null && cfg.autoClose) [
|
||||
{
|
||||
event = "BufEnter";
|
||||
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif";
|
||||
nested = true;
|
||||
}
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('nvim-tree').setup(${helpers.toLuaObject options})
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue