5 Commits

Author SHA1 Message Date
8484fdaa28 chore(main): release 1.0.1 (#18)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-06 19:33:37 +01:00
8c40aa7b80 chore(build): auto-generate vimdoc 2023-01-06 18:29:26 +00:00
70c281e54e fix: dont throw error when session was already stopped 2023-01-06 19:28:37 +01:00
7421e30704 chore(build): auto-generate vimdoc 2023-01-05 07:38:46 +00:00
5453a25028 docs: updated session directory (#16)
* Update README.md

* Update docs
2023-01-05 08:38:06 +01:00
6 changed files with 22 additions and 16 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ doc/tags
debug
.repro
foo.*
*.log
data

View File

@ -1,5 +1,12 @@
# Changelog
## [1.0.1](https://github.com/folke/persistence.nvim/compare/v1.0.0...v1.0.1) (2023-01-06)
### Bug Fixes
* dont throw error when session was already stopped ([70c281e](https://github.com/folke/persistence.nvim/commit/70c281e54e34630d8bef9b1cf9f7a0ac3edd6a1c))
## 1.0.0 (2023-01-04)

View File

@ -9,7 +9,7 @@
## ⚡️ Requirements
- Neovim >= 0.5.0
- Neovim >= 0.7.2
## 📦 Installation
@ -50,7 +50,7 @@ Persistence 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("state") .. "/sessions/"), -- directory where session files are saved
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
}
```

View File

@ -1,4 +1,4 @@
*persistence.nvim.txt* For Neovim >= 0.8.0 Last change: 2023 January 04
*persistence.nvim.txt* For Neovim >= 0.8.0 Last change: 2023 January 06
==============================================================================
Table of Contents *persistence.nvim-table-of-contents*
@ -25,7 +25,7 @@ FEATURES *persistence.nvim-features*
REQUIREMENTS *persistence.nvim-requirements*
- Neovim >= 0.5.0
- Neovim >= 0.7.2
INSTALLATION *persistence.nvim-installation*
@ -69,7 +69,7 @@ Persistence 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("state") .. "/sessions/"), -- directory where session files are saved
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
}
<

View File

@ -69,7 +69,7 @@ Persistence comes with the following defaults:
>
{
dir = vim.fn.expand(vim.fn.stdpath("config") .. "/sessions/"), -- directory where session files are saved
dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"), -- directory where session files are saved
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
}
<

View File

@ -27,19 +27,16 @@ function M.setup(opts)
end
function M.start()
vim.cmd([[
augroup Persistence
autocmd!
autocmd VimLeavePre * lua require("persistence").save()
augroup end
]])
vim.api.nvim_create_autocmd("VimLeavePre", {
group = vim.api.nvim_create_augroup("persistence", { clear = true }),
callback = function()
M.save()
end,
})
end
function M.stop()
vim.cmd([[
autocmd! Persistence
augroup! Persistence
]])
pcall(vim.api.nvim_del_augroup_by_name, "persistence")
end
function M.save()