You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to open a parent directory with nvim .., I get a list of files in such directory as expected (I have hijack_netrw_behavior='open_current'). However, if I open and close neo-tree, I only see the files and folders in the directory where I executed the nvim .. command (i.e. in the . directory). Additionally, if I open a file in the .. directory via neo-tree and then try to open neo-tree again I get a "File not in cwd." prompt, asking if I want to change cwd.
How can I make sure that nvim .. uses the .. directory as cwd? Previously I was using vim-tree with project.nvim (which doesn't seem to be maintained anymore) and it seemed to behave as expected.
Current settings for lazy.nvim:
return {
'nvim-neo-tree/neo-tree.nvim',
version='*',
dependencies= {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended'MunifTanjim/nui.nvim',
},
cmd='Neotree',
keys= {
{ '\\', ':Neotree reveal<CR>', desc='NeoTree reveal', silent=true },
},
lazy=false,
priority=9000,
opts= {
close_if_last_window=true, -- Close Neo-tree if it is the last window left in the tabfilesystem= {
window= {
mappings= {
['\\'] ='close_window',
},
},
hide_dotfiles=false,
hide_gitignord=false,
hide_hidden=false,
never_show= { -- remains hidden even if visible is toggled to true, this overrides always_show'.DS_Store',
},
never_show_by_pattern= { -- uses glob style patterns'.null-ls_*',
},
hijack_netrw_behavior='open_current',
},
default_component_configs= {
modified= {
symbol='[+]',
highlight='NeoTreeModified',
},
name= {
trailing_slash=false,
use_git_status_colors=true,
highlight='NeoTreeFileName',
},
git_status= {
symbols= {
added='', -- or "✚", but this is redundant info if you use git_status_colors on the namemodified='', -- or "", but this is redundant info if you use git_status_colors on the namedeleted='', -- this can only be used in the git_status sourcerenamed='', -- this can only be used in the git_status source-- Status typeuntracked='',
ignored='◌',
unstaged='',
staged='',
conflict='',
},
},
},
},
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If I try to open a parent directory with
nvim ..
, I get a list of files in such directory as expected (I havehijack_netrw_behavior='open_current'
). However, if I open and closeneo-tree
, I only see the files and folders in the directory where I executed thenvim ..
command (i.e. in the.
directory). Additionally, if I open a file in the..
directory vianeo-tree
and then try to openneo-tree
again I get a"File not in cwd."
prompt, asking if I want to changecwd
.How can I make sure that
nvim ..
uses the..
directory ascwd
? Previously I was usingvim-tree
withproject.nvim
(which doesn't seem to be maintained anymore) and it seemed to behave as expected.Current settings for
lazy.nvim
:Beta Was this translation helpful? Give feedback.
All reactions