mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
nvim-tree: use lazy
This commit is contained in:
parent
5c105b8182
commit
14061c6db5
1 changed files with 11 additions and 4 deletions
|
@ -16,8 +16,6 @@
|
||||||
inherit (self.options.vim.filetree.nvimTree) mappings;
|
inherit (self.options.vim.filetree.nvimTree) mappings;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim.startPlugins = ["nvim-tree-lua"];
|
|
||||||
|
|
||||||
vim.maps.normal = mkMerge [
|
vim.maps.normal = mkMerge [
|
||||||
(mkBinding cfg.mappings.toggle ":NvimTreeToggle<cr>" mappings.toggle.description)
|
(mkBinding cfg.mappings.toggle ":NvimTreeToggle<cr>" mappings.toggle.description)
|
||||||
(mkBinding cfg.mappings.refresh ":NvimTreeRefresh<cr>" mappings.refresh.description)
|
(mkBinding cfg.mappings.refresh ":NvimTreeRefresh<cr>" mappings.refresh.description)
|
||||||
|
@ -29,6 +27,17 @@ in {
|
||||||
"<leader>t" = "+NvimTree";
|
"<leader>t" = "+NvimTree";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vim.lazy = {
|
||||||
|
plugins = {
|
||||||
|
nvim-tree-lua = {
|
||||||
|
package = "nvim-tree-lua";
|
||||||
|
setupModule = "nvim-tree";
|
||||||
|
inherit (cfg) setupOpts;
|
||||||
|
cmd = ["NvimTreeClipboard" "NvimTreeClose" "NvimTreeCollapse" "NvimTreeCollapseKeepBuffers" "NvimTreeFindFile" "NvimTreeFindFileToggle" "NvimTreeFocus" "NvimTreeHiTest" "NvimTreeOpen" "NvimTreeRefresh" "NvimTreeResize" "NvimTreeToggle"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
vim.pluginRC.nvimtreelua = entryAnywhere ''
|
vim.pluginRC.nvimtreelua = entryAnywhere ''
|
||||||
${
|
${
|
||||||
optionalString cfg.setupOpts.disable_netrw ''
|
optionalString cfg.setupOpts.disable_netrw ''
|
||||||
|
@ -38,8 +47,6 @@ in {
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
|
||||||
require'nvim-tree'.setup(${toLuaObject cfg.setupOpts})
|
|
||||||
|
|
||||||
${
|
${
|
||||||
optionalString cfg.openOnSetup ''
|
optionalString cfg.openOnSetup ''
|
||||||
-- autostart behaviour
|
-- autostart behaviour
|
||||||
|
|
Loading…
Reference in a new issue