Neovim: Auto-refresh neotree when closing lazygit
This commit is contained in:
@ -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
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user