1

Neovim: Auto-refresh neotree when closing lazygit

This commit is contained in:
2024-10-14 20:47:38 +02:00
parent b7a2885fd3
commit 8cd83097be

View File

@ -123,6 +123,19 @@ in {
# extraPython3Packages = p: []; # extraPython3Packages = p: [];
autoCmd = [ autoCmd = [
{
desc = "Refresh neotree when closing lazygit";
event = ["BufLeave"];
pattern = ["*lazygit*"];
callback.__raw = ''
function()
require("neo-tree.sources.filesystem.commands").refresh(
require("neo-tree.sources.manager").get_state("filesystem")
)
end
'';
}
{ {
desc = "Lint the file if autolint is enabled"; desc = "Lint the file if autolint is enabled";
event = ["BufWritePost"]; event = ["BufWritePost"];
@ -239,7 +252,7 @@ in {
event = ["InsertEnter"]; event = ["InsertEnter"];
config = mkDefaultConfig name; config = mkDefaultConfig name;
opts = { opts = {
# mapping = ["jk"]; # NOTE: Deprecated # mapping = ["jk"]; # Deprecated but still the default
default_mappings = true; default_mappings = true;
timeout = 200; # In ms timeout = 200; # In ms
}; };