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

Neovim looks for and stores configurations in Windows locations instead of Unix locations #17855

Open
2 of 7 tasks
500-internal-server-error opened this issue Jul 25, 2023 · 7 comments
Labels

Comments

@500-internal-server-error

Description / Steps to reproduce the issue

neovim has an official Windows version available, which uses Windows-style paths and locations to look for and store configuration files (e.g., %localappdata%\nvim-data\). As expected, on Linux, neovim uses Unix-style paths and locations instead (e.g., $XDG_CONFIG_HOME/nvim/).

In general, I expect MSYS2 / mingw to be a compatibility shim to allow traditionally native Unix utilities to run on Windows. This includes paths, but not locations. Doing so would cleanly separate documentation/tutorials/configurations for "native" Windows apps from *nix apps (which I consider MSYS2 / mingw apps to be, despite using native Windows APIs).

Tested with mingw-w64-ucrt-x86_64-neovim, but probably affects other environments too.

Expected behavior

I expect mingw-w64-ucrt-x86_64-neovim to use Unix locations to store and look for configuration files (e.g., $XDG_CONFIG_HOME/nvim).

Actual behavior

mingw-w64-ucrt-x86_64-neovim uses Windows locations to store and look for configuration files (e.g., %localappdata%\nvim-data).

Verification

Windows Version

MSYS_NT-10.0-22621

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

No response

@oltolm
Copy link
Contributor

oltolm commented Jul 26, 2023

There are different environments. What you are saying is only true for the MSYS environment. The UCRT64 environment you are talking about is for regular Windows applications. This is not a bug.

@lazka
Copy link
Member

lazka commented Jul 26, 2023

We should probably document somewhere what users have to expect in such cases.

@FrankHB
Copy link

FrankHB commented Jul 30, 2023

This is not specific to neovim. Many others, like qbittorrent, will behave similarly. (I recall it because I've once forgotten to back the configuration in %LocalAppData% up before a system reinstallation...)

@Kreijstal
Copy link
Contributor

Kreijstal commented Jan 5, 2024

you probably look for msys neovim, not mingw/ucrt these are meant to be used outside cygwin/msys, in cmd.exe, powershell.exe, not in the msys enviroment, for the msys enviroment, you have to use the vim version without any prefix, aka pacman -S vim not mingw-w64-$arch-vim, unfortunately, I do not think they accept packages that are dev based on msys itself so you have to compile neovim from scratch, (or use cygwin :( )

@lazka
Copy link
Member

lazka commented Jan 5, 2024

We should probably document somewhere what users have to expect in such cases.

This exists now: https://www.msys2.org/docs/configuration/

@prgreadonly
Copy link

You can workaround this by explictly specifying XDG_CONFIG_HOME:

XDG_CONFIG_HOME=~/.config nvim-qt

@FrankHB
Copy link

FrankHB commented Jul 28, 2024

We should probably document somewhere what users have to expect in such cases.

This exists now: https://www.msys2.org/docs/configuration/

I've added some more text for users who want to hack against it. Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants