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

feature: allow customizing path for state files #1201

Closed
1 task done
andrevmatos opened this issue Feb 15, 2025 · 1 comment
Closed
1 task done

feature: allow customizing path for state files #1201

andrevmatos opened this issue Feb 15, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@andrevmatos
Copy link

Did you check the docs?

  • I have read all the snacks.nvim docs

Is your feature request related to a problem? Please describe.

There are a few stdpath("data") hardcoded throughout the code, e.g. for history's path and frecency's store_file.
It'd be nice to have an option to make sure any state file has customizable path, so we can use stdpath("state") if desired, putting those files in ~/.local/state/nvim/[snacks/] by default, and keeping ~/.local/share/nvim clean.

Describe the solution you'd like

Ensure no path is hardcoded, and can be customized.

Describe alternatives you've considered

Overriding $XDG_DATA_HOME can achieve this, but also can mess with any program/command spawned from neovim which depend from it being set to the proper path.
Overrding stdpath itself is possible, but quite hacky.

Additional context

Modern XDG specifications recommend putting "state files" (files which are written at runtime based on user's interactions) in $XDG_STATE_HOME (usually ~/.local/state), leaving $XDG_DATA_HOME for user-owned program files and assets instead.

@andrevmatos andrevmatos added the enhancement New feature or request label Feb 15, 2025
@folke
Copy link
Owner

folke commented Feb 20, 2025

sorry, but I don't see the point. Closing

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants