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
On Windows, when trying to open a file in neo-tree with any spaces in the file's path, it shows an empty buffer.
It seems that neo-tree tries to replace all \s into /s which wouldn't suit all the cases on Windows. I came to this conclusion because If I try to save the faulty "empty" buffer, neovim will say the file cannot be found; the expected path, d:\test\ path\test.txt for example, is converted to d:/test/ path/test.txt by neo-tree, where the escaped space \ becomes / which is invalid.
This problem doesn't exist by opening the file via its path directly or by nvim-tree
Screenshots, Traceback
I tried this in a clean neovim environment with only Lazy and neo-tree installed.
Steps to Reproduce
Create or find a directory with one or more spaces in its path
Open a file within the directory
[Phenomenon 1] The opened buffer won't show the file's content
Save the opened buffer
[Phenomenon 2] It'll show an error message of 'no such file or directory'.
Expected Behavior
File should be opened and saved
Your Configuration
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
-- add any other plugins here
}
localneotree_config= {
"nvim-neo-tree/neo-tree.nvim",
dependencies= { "MunifTanjim/nui.nvim", "nvim-tree/nvim-web-devicons", "nvim-lua/plenary.nvim" },
cmd= { "Neotree" },
keys= {
{ "<Leader>e", "<Cmd>Neotree<CR>" }, -- change or remove this line if relevant.
},
opts= {},
}
table.insert(plugins, neotree_config)
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
The text was updated successfully, but these errors were encountered:
Did you check docs and existing issues?
Neovim Version (nvim -v)
0.9.1
Operating System / Version
Windows11 22H2 22621.2070
Describe the Bug
On Windows, when trying to open a file in neo-tree with any spaces in the file's path, it shows an empty buffer.
It seems that neo-tree tries to replace all
\
s into/
s which wouldn't suit all the cases on Windows. I came to this conclusion because If I try to save the faulty "empty" buffer, neovim will say the file cannot be found; the expected path,d:\test\ path\test.txt
for example, is converted tod:/test/ path/test.txt
by neo-tree, where the escaped space\
becomes/
which is invalid.This problem doesn't exist by opening the file via its path directly or by nvim-tree
Screenshots, Traceback
I tried this in a clean neovim environment with only Lazy and neo-tree installed.
Steps to Reproduce
Expected Behavior
File should be opened and saved
Your Configuration
The text was updated successfully, but these errors were encountered: