Skip to content

Commit 5035657

Browse files
authored
feat: add persistence session strategy
1 parent cff343c commit 5035657

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

strategies/nvim_persistence.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# "nvim persistence strategy"
4+
# Works with custom config in persistence.nvim for tmux-aware session management
5+
# Usage: set -g @resurrect-strategy-nvim 'persistence'
6+
7+
ORIGINAL_COMMAND="$1"
8+
DIRECTORY="$2"
9+
10+
main() {
11+
# Always replace with nvim + persistence loading
12+
# persistence.nvim will handle whether a session exists for this context
13+
echo "nvim -c 'lua vim.schedule(function() pcall(require, \"persistence\") and require(\"persistence\").load() end)'"
14+
}
15+
16+
main

0 commit comments

Comments
 (0)