mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
refactor: cleanup
This commit is contained in:
parent
008de2c10e
commit
1ad5b0e016
1 changed files with 1 additions and 2 deletions
|
|
@ -46,15 +46,14 @@ return {
|
|||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||
desc = "Start Neo-tree with directory",
|
||||
once = true,
|
||||
callback = function()
|
||||
if package.loaded["neo-tree"] then
|
||||
vim.api.nvim_del_augroup_by_name("Neotree_start_directory")
|
||||
return
|
||||
else
|
||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||
if stats and stats.type == "directory" then
|
||||
require("neo-tree")
|
||||
vim.api.nvim_del_augroup_by_name("Neotree_start_directory")
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue