Replies: 3 comments 1 reply
-
It will use your current working directory of the tab by default if you open in a sidebar, or the cwd of the window if you open netrw style. Do you have another plugin that is automatically setting your CWD to that of the file? |
Beta Was this translation helpful? Give feedback.
-
Did you ever find the fix? I have this issue. I always shows a few folders above, but constantly changes the root directory when i switch files. |
Beta Was this translation helpful? Give feedback.
-
For anyone who needs a solution for this, I finally took the time to fix this. So when I toggle neotree this is the code I execute local wk = require 'which-key'
wk.register {
['<leader>e'] = {
function()
local lspconfig = require 'lspconfig'
local root_patterns = { '.git' }
local root_dir = lspconfig.util.root_pattern(unpack(root_patterns))(vim.fn.expand '%:p')
require('neo-tree.command').execute { toggle = true, dir = root_dir }
end,
'Explorer',
},
} |
Beta Was this translation helpful? Give feedback.
-
So if I open a file in a sub folder and open Neo-tree, the only folder it showing is the current one I am in. How can I change this? Here is my config?
Beta Was this translation helpful? Give feedback.
All reactions