mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 07:29:49 +01:00
nvimtree: move beforeAll to pluginRC
This commit is contained in:
parent
d459fd16ce
commit
dee78a393b
1 changed files with 65 additions and 65 deletions
|
@ -32,8 +32,9 @@ in {
|
||||||
(mkLznBinding ["n"] cfg.mappings.findFile ":NvimTreeFindFile<cr>" mappings.findFile.description)
|
(mkLznBinding ["n"] cfg.mappings.findFile ":NvimTreeFindFile<cr>" mappings.findFile.description)
|
||||||
(mkLznBinding ["n"] cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description)
|
(mkLznBinding ["n"] cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description)
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
beforeAll = ''
|
pluginRC.nvim-tree = entryAnywhere ''
|
||||||
${
|
${
|
||||||
optionalString cfg.setupOpts.disable_netrw ''
|
optionalString cfg.setupOpts.disable_netrw ''
|
||||||
-- disable netrew completely
|
-- 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", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
group = vim.api.nvim_create_augroup("load_nvim_tree", {}),
|
group = vim.api.nvim_create_augroup("load_nvim_tree", {}),
|
||||||
desc = "Loads nvim-tree when openning a directory",
|
desc = "Loads nvim-tree when openning a directory",
|
||||||
|
@ -103,5 +104,4 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue