nvimtree: move beforeAll to pluginRC

This commit is contained in:
Ching Pei Yang 2024-11-19 01:18:52 +01:00 committed by raf
parent d459fd16ce
commit dee78a393b

View file

@ -32,8 +32,9 @@ in {
(mkLznBinding ["n"] cfg.mappings.findFile ":NvimTreeFindFile<cr>" mappings.findFile.description)
(mkLznBinding ["n"] cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description)
];
};
beforeAll = ''
pluginRC.nvim-tree = entryAnywhere ''
${
optionalString cfg.setupOpts.disable_netrw ''
-- disable netrew completely
@ -42,7 +43,7 @@ in {
''
}
${optionalString (cfg.setupOpts.hijack_netrw && !cfg.openOnSetup) ''
${optionalString (config.vim.lazy.enable && cfg.setupOpts.hijack_netrw && !cfg.openOnSetup) ''
vim.api.nvim_create_autocmd("BufEnter", {
group = vim.api.nvim_create_augroup("load_nvim_tree", {}),
desc = "Loads nvim-tree when openning a directory",
@ -103,5 +104,4 @@ in {
'';
};
};
};
}