comment out neo tree instant start
This commit is contained in:
parent
1772db9d9f
commit
380d10f747
|
|
@ -14,25 +14,25 @@ return {
|
||||||
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
|
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
|
||||||
},
|
},
|
||||||
-- sourced from here https://github.com/LazyVim/LazyVim/blob/4d706f1bdc687f1d4d4cd962ec166c65c453633e/lua/lazyvim/plugins/editor.lua#L46-L64
|
-- sourced from here https://github.com/LazyVim/LazyVim/blob/4d706f1bdc687f1d4d4cd962ec166c65c453633e/lua/lazyvim/plugins/editor.lua#L46-L64
|
||||||
init = function()
|
-- init = function()
|
||||||
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
-- -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
||||||
-- because `cwd` is not set up properly.
|
-- -- because `cwd` is not set up properly.
|
||||||
vim.api.nvim_create_autocmd('BufEnter', {
|
-- vim.api.nvim_create_autocmd('BufEnter', {
|
||||||
group = vim.api.nvim_create_augroup('Neotree_start_directory', { clear = true }),
|
-- group = vim.api.nvim_create_augroup('Neotree_start_directory', { clear = true }),
|
||||||
desc = 'Start Neo-tree with directory',
|
-- desc = 'Start Neo-tree with directory',
|
||||||
once = true,
|
-- once = true,
|
||||||
callback = function()
|
-- callback = function()
|
||||||
if package.loaded['neo-tree'] then
|
-- if package.loaded['neo-tree'] then
|
||||||
return
|
-- return
|
||||||
else
|
-- else
|
||||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
-- local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||||
if stats and stats.type == 'directory' then
|
-- if stats and stats.type == 'directory' then
|
||||||
require 'neo-tree'
|
-- require 'neo-tree'
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end,
|
-- end,
|
||||||
})
|
-- })
|
||||||
end,
|
-- end,
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
filtered_items = { hide_dotfiles = false },
|
filtered_items = { hide_dotfiles = false },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue