feat!: use stdpath data instead of config

As per discussion on https://github.com/folke/persistence.nvim/pull/3.

Using stdpath('data') instead of stdpath('config') is more appropriate.
main
olimorris 2022-01-20 14:33:10 +00:00
parent 9fd0958a19
commit d9b386c618
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ Persisted comes with the following defaults:
```lua ```lua
{ {
dir = vim.fn.expand(vim.fn.stdpath("config") .. "/sessions/"), -- directory where session files are saved dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"), -- directory where session files are saved
use_git_branch = false, -- create session files based on the branch of the git enabled repository use_git_branch = false, -- create session files based on the branch of the git enabled repository
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
} }

View File

@ -2,7 +2,7 @@ local M = {}
---@class PersistedOptions ---@class PersistedOptions
local defaults = { local defaults = {
dir = vim.fn.expand(vim.fn.stdpath("config") .. "/sessions/"), -- directory where session files are saved dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"), -- directory where session files are saved
use_git_branch = false, -- create session files based on the branch of the git enabled repository use_git_branch = false, -- create session files based on the branch of the git enabled repository
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
} }