mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 07:29:49 +01:00
neo-tree: move beforeAll to pluginRC
This commit is contained in:
parent
9c979a4a84
commit
d459fd16ce
1 changed files with 21 additions and 22 deletions
|
@ -4,7 +4,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
|
||||||
cfg = config.vim.filetree.neo-tree;
|
cfg = config.vim.filetree.neo-tree;
|
||||||
in {
|
in {
|
||||||
|
@ -22,10 +22,14 @@ in {
|
||||||
setupModule = "neo-tree";
|
setupModule = "neo-tree";
|
||||||
inherit (cfg) setupOpts;
|
inherit (cfg) setupOpts;
|
||||||
|
|
||||||
beforeAll =
|
cmd = ["Neotree"];
|
||||||
optionalString (cfg.setupOpts.filesystem.hijack_netrw_behavior != "disabled")
|
};
|
||||||
|
|
||||||
|
visuals.nvim-web-devicons.enable = true;
|
||||||
# from https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/1326
|
# from https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/1326
|
||||||
''
|
pluginRC.neo-tree =
|
||||||
|
mkIf (cfg.setupOpts.filesystem.hijack_netrw_behavior != "disabled" && config.vim.lazy.enable)
|
||||||
|
(entryAnywhere ''
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
group = vim.api.nvim_create_augroup("load_neo_tree", {}),
|
group = vim.api.nvim_create_augroup("load_neo_tree", {}),
|
||||||
desc = "Loads neo-tree when openning a directory",
|
desc = "Loads neo-tree when openning a directory",
|
||||||
|
@ -41,12 +45,7 @@ in {
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
'';
|
'');
|
||||||
cmd = ["Neotree"];
|
|
||||||
event = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
visuals.nvim-web-devicons.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue