Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netrw (file explorer) does not work on network location on Windows #27401

Open
kalocsaibotond opened this issue Feb 9, 2024 · 3 comments
Open
Labels
bug issues reporting wrong behavior netrw fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu platform:windows

Comments

@kalocsaibotond
Copy link

kalocsaibotond commented Feb 9, 2024

Problem

I have tried to work with neovim on a network location, and use Netwr to browse around in the current working directory (CWD), however, when I use it it show utter emptyness.

This bug seems to correlate with breaking down of the LazyVim config. Basically, when I launch Neovim with LazyVim, and use the find file or find text option to open a file, even though in the menus, proper things are displayed, when I open the files with them neovim opens a completely empty file. If I write something into said file, and write it, then Neovim replicates the the folder structure of the server in which the chosen file lies into the CWD. and puts next to the chosen file.
So for example I have a file bar.py at location Microsoft.PowerShell.Core\FileSystem::\\server\...\foo\bar.py and I choose Microsoft.PowerShell.Core\FileSystem::\\server\...\foo\ as CWD for my LazyVim session. Then choosing to edit bar.py will result in the opening of a completely empty file. Then if I save it, it will just put in the CWD the following folder structure server...\foo\bar.py next to bar.py .
In addition the nvim-tree plugin also fails to work the same way as the Netwr do.

I highly suspect that the breakdown of the LazyVim config emerges from this bug of the Netwr. In addition, I suspect that this bug emerges from its broken support of UNC paths.

Steps to reproduce

nvim --clean .

Expected behavior

Instead of the standard functionality of Netwr works in the current working directory, we get nothing it is used on a network location.

Neovim version (nvim -v)

0.9.5

Vim (not Nvim) behaves the same?

9.0

Operating system/version

Windows 10 Pro, Version 22H2 (OS Build 19045.3930)

Terminal name/version

wezterm 20230712-072601-f4abf8fd

$TERM environment variable

not defined

Installation

Scoop

@kalocsaibotond kalocsaibotond added the bug issues reporting wrong behavior label Feb 9, 2024
@justinmk justinmk added the netrw fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu label Feb 9, 2024
@justinmk justinmk changed the title Netwr (builtin file exploler) does not work on network location on Windows Netrw (builtin file exploler) does not work on network location on Windows Feb 9, 2024
@justinmk justinmk changed the title Netrw (builtin file exploler) does not work on network location on Windows Netrw (file explorer) does not work on network location on Windows Feb 9, 2024
@justinmk

This comment was marked as resolved.

@kalocsaibotond
Copy link
Author

#7930 is still open though I haven't confirmed it recently.

Can you try the development version:

  • The Releases page has pre-built archives for Linux/Windows/macOS.
  • Check :version to confirm that you are using the latest version.

I scooped down the nightly version, and the behaviour is the same.
Result of nvim -v

NVIM v0.10.0-dev-2315+g32b49448b
Build type: RelWithDebInfo
LuaJIT 2.1.1707061634

@kalocsaibotond
Copy link
Author

I reported the similar issue on the Zoxide github repository, and a person come up with a workaround that even tried out with neovim and it works:
ajeetdsouza/zoxide#677 (comment)

The Netwr works fine for mapped network drives, so maping network locations as drives circumvent the lack of support for UNC path and Netwr works again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior netrw fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu platform:windows
Projects
None yet
Development

No branches or pull requests

2 participants