From 38cf66b8f841fca096bb7b976699ad8add3673e7 Mon Sep 17 00:00:00 2001 From: olimorris Date: Sat, 12 Mar 2022 08:46:54 +0000 Subject: [PATCH] chore: clean up README.md and test spec --- README.md | 4 +++- tests/default_settings_spec.lua | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d22694..2a149aa 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Install the plugin with your preferred package manager: -- Lua use({ "olimorris/persisted.nvim", + --module = "persisted", -- Consider lazy loading if you use a dashboard or startup screen config = function() require("persisted").setup() end, @@ -88,10 +89,11 @@ To use the plugin, the commands below are available: - `SessionToggle` - Determines whether to load, start or stop a session > **Note:** The author only binds `SessionToggle` to a keymap for simplicity. +> **Remember:** These will not work out of the box if you're lazy loading. ### Callbacks -The plugin allows for _before_ and _after_ callbacks to be executed relative to the session. This is achieved via the `before_save` and `after_save` configuration options. +The plugin allows for _before_ and _after_ callbacks to be executed relative to the session being saved. This is achieved via the `before_save` and `after_save` configuration options. > **Note:** The author uses a _before_ callback to ensure that [minimap.vim](https://github.com/wfxr/minimap.vim) is not written into the session. Its presence prevents the exact buffer and cursor position from being restored when loading a session. diff --git a/tests/default_settings_spec.lua b/tests/default_settings_spec.lua index fdeff7b..2c5eb62 100644 --- a/tests/default_settings_spec.lua +++ b/tests/default_settings_spec.lua @@ -1,4 +1,3 @@ -local e = vim.fn.fnameescape local session_dir = vim.fn.getcwd() .. "/tests/data/" require("persisted").setup({ dir = session_dir