folke / persistence.nvim

💾 Simple session management for Neovim
Apache License 2.0
638 stars 26 forks source link

use stdpath('data') instead of stdpath('config') #3

Closed goolord closed 1 year ago

goolord commented 3 years ago

i feel like session files don't belong in the neovim config dir by default

bruhtus commented 2 years ago

I think using stdpath('data') is more appropriate rather than using stdpath('cache'), like shada file.

goolord commented 2 years ago

i think that's just bikeshedding. as long as it's in an even mildly appropriate directory, i am not personally invested in which base directory it's in

snezhniylis commented 2 years ago

@bruhtus is right. XDG_CACHE_HOME is supposed to store non-persistent files that can be painlessly removed any time. Cleaning file manager thumbnails and compilation caches should not remove Neovim sessions. Using stdpath('cache') is as appropriate as using stdpath('config').

stdpath('data') should be used instead.

goolord commented 2 years ago

the xdg base directory spec does not make any mention of the lifetime of files in XDG_CACHE_HOME, in fact it is intentionally vague, but i'm mildly inclined to agree. it is still bikeshedding

olimorris commented 2 years ago

As a heads up, I've forked this repo and included your pull request in https://github.com/olimorris/persisted.nvim