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
end end
''; '';
in[ in
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L21-L37 [
{ # 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"; desc = "Open explorer on startup with directory";
group = "neotree"; event = "BufEnter";
group = "neotree";
callback.__raw = '' callback.__raw = ''
function() function()
if package.loaded["neo-tree"] then 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 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 end
end '';
''; }
} # https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L25-L35
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/neo-tree.lua#L25-L35 {
{ desc = "Refresh explorer sources when closing lazygit";
desc = "Refresh explorer sources when closing lazygit"; event = "TermClose";
event = "TermClose"; group = "neotree";
group = "neotree"; pattern = "*lazygit*";
pattern = "*lazygit*"; callback.__raw = refresh;
callback.__raw = refresh; }
} {
{ desc = "Refresh explorer sources on focus";
desc = "Refresh explorer sources on focus"; event = "FocusGained";
event = "FocusGained"; group = "neotree";
group = "neotree"; callback.__raw = refresh;
callback.__raw = refresh; }
} ];
];
keymaps = [ keymaps = [
{ {