diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-07 12:58:00 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-07 12:58:00 +0100 |
commit | 11eb82bcea1d29a23c7d6bed28f23a86b98cb2a6 (patch) | |
tree | dd6f18c3634399c5f8469a21bdf0deb4dedf2dec /fnl/config/cmd.fnl | |
parent | dedf2e53f661cde3e50852ddfd5f42cdfe97b215 (diff) |
Replace session manager to persistence.nvim
Diffstat (limited to 'fnl/config/cmd.fnl')
-rw-r--r-- | fnl/config/cmd.fnl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fnl/config/cmd.fnl b/fnl/config/cmd.fnl index 1971260..e548839 100644 --- a/fnl/config/cmd.fnl +++ b/fnl/config/cmd.fnl @@ -66,3 +66,21 @@ (let [spectre (util.prequire :spectre)] (spectre.open_file_search))) {:nargs 0}) + +(nvim.create_user_command :RestoreSession + (lambda [] + (let [persistence (util.prequire :persistence)] + (persistence.load))) + {:nargs 0}) + +(nvim.create_user_command :RestoreLastSession + (lambda [] + (let [persistence (util.prequire :persistence)] + (persistence.load {:last true}))) + {:nargs 0}) + +(nvim.create_user_command :IgnoreSession + (lambda [] + (let [persistence (util.prequire :persistence)] + (persistence.stop))) + {:nargs 0}) |