From d9b386c6185b8787489d6c3ee1fe9d03059e2e13 Mon Sep 17 00:00:00 2001 From: olimorris Date: Thu, 20 Jan 2022 14:33:10 +0000 Subject: [PATCH] feat!: :sparkles: 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. --- README.md | 2 +- lua/persisted/config.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6e37a9..8f45562 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Persisted comes with the following defaults: ```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 options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving } diff --git a/lua/persisted/config.lua b/lua/persisted/config.lua index 489c15f..9606e52 100644 --- a/lua/persisted/config.lua +++ b/lua/persisted/config.lua @@ -2,7 +2,7 @@ local M = {} ---@class PersistedOptions 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 options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving }