style(plugins/neo-tree): format

This commit is contained in:
Nicolas Goudry 2024-06-09 09:19:43 +02:00
parent d0df20c538
commit 285708a68a
No known key found for this signature in database
GPG key ID: 5FC434D9FFD1DF44

View file

@ -215,41 +215,42 @@
end
end
'';
in[
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L21-L37
{
desc = "Open explorer on startup with directory";
event = "BufEnter";
group = "neotree";
in
[
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L21-L37
{
desc = "Open explorer on startup with directory";
event = "BufEnter";
group = "neotree";
callback.__raw = ''
function()
if package.loaded["neo-tree"] then
return true
else
local stats = vim.loop.fs_stat(vim.api.nvim_buf_get_name(0))
if stats and stats.type == "directory" then
callback.__raw = ''
function()
if package.loaded["neo-tree"] then
return true
else
local stats = vim.loop.fs_stat(vim.api.nvim_buf_get_name(0))
if stats and stats.type == "directory" then
return true
end
end
end
end
'';
}
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L25-L35
{
desc = "Refresh explorer sources when closing lazygit";
event = "TermClose";
group = "neotree";
pattern = "*lazygit*";
callback.__raw = refresh;
}
{
desc = "Refresh explorer sources on focus";
event = "FocusGained";
group = "neotree";
callback.__raw = refresh;
}
];
'';
}
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L25-L35
{
desc = "Refresh explorer sources when closing lazygit";
event = "TermClose";
group = "neotree";
pattern = "*lazygit*";
callback.__raw = refresh;
}
{
desc = "Refresh explorer sources on focus";
event = "FocusGained";
group = "neotree";
callback.__raw = refresh;
}
];
keymaps = [
{