Neovim: Auto-refresh neotree when closing lazygit
This commit is contained in:
@ -123,6 +123,19 @@ in {
|
||||
# extraPython3Packages = p: [];
|
||||
|
||||
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";
|
||||
event = ["BufWritePost"];
|
||||
@ -239,7 +252,7 @@ in {
|
||||
event = ["InsertEnter"];
|
||||
config = mkDefaultConfig name;
|
||||
opts = {
|
||||
# mapping = ["jk"]; # NOTE: Deprecated
|
||||
# mapping = ["jk"]; # Deprecated but still the default
|
||||
default_mappings = true;
|
||||
timeout = 200; # In ms
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user