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

Detect the XDG runtime setting in env instead of configuration (on macOS) #16

Open
nanozuki opened this issue May 8, 2021 · 3 comments

Comments

@nanozuki
Copy link

nanozuki commented May 8, 2021

For some compatibility reasons, I set my own XDG Base Directories. Not equal to default macOS folder suggestions.
I know there is a configuration to open XDG support on Mac, but some zig tools (such as zls ) don't provide a method to change it. If known-folders can read env and follow the XDG settings, will resolve this problem.

@ikskuh
Copy link
Member

ikskuh commented May 8, 2021

Make an issue on their repository to enable XDG on mac. They only have to add this to their root file:

pub const known_folders_config = .{ .xdg_on_mac = true };

@nanozuki
Copy link
Author

nanozuki commented May 8, 2021

Indeed this is a method. But I think it's still necessary to detect env:

  • Give the choice to the end-user, not binary developers. Since one binary will be used by many users with different enviroments.
  • By detecting env variables, a user can opt-in XDG directory, and use other directories in macOS default.

@will
Copy link

will commented Jul 13, 2024

I would also like this feature.

I use macos and prefer using XDG directories for everything. I use zls which uses this project, but I have no way to insert pub const known_folders_config = .{ .xdg_on_mac = true }; into the code of zls, since I'm just a user of zls.

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

No branches or pull requests

3 participants