diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index cf960fbc..6fd9c242 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -20,11 +20,16 @@ return { }, init = function() vim.g.neo_tree_remove_legacy_commands = 1 + if vim.fn.argc() == 1 then + local stat = vim.loop.fs_stat(vim.fn.argv(0)) + if stat and stat.type == "directory" then + require("neo-tree") + end + end end, opts = { filesystem = { follow_current_file = true, - hijack_netrw_behavior = "open_current", }, }, },