style(plugins/neo-tree): format
This commit is contained in:
parent
d0df20c538
commit
285708a68a
1 changed files with 32 additions and 31 deletions
|
|
@ -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 = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue