Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add link to #72 describing solution #74

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,20 @@ Neovim or loading a different session. This behavior is disabled by default, but
using the `autosave.*` configuration options. Check [doc/possession.txt](./doc/possession.txt)
for details.

### Overwriting CWD session

When `autosave.cwd` is set to `true`, there are situations were the cwd session might be saved when it is not wanted,
e.g. when file arguments are passed to Neovim, and when a session is closed via `:PossessionClose`
(see https://github.com/jedrzejboczar/possession.nvim/issues/72 for details).
To prevent overwriting the cwd session in these cases, you can use the following setting:
```lua
autosave = {
cwd = function()
return not require('possession.session').exists(require('possession.paths').cwd_session_name())
end
}
```

## Auto-load

Sessions can be auto-loaded by setting the `autoload.*` config options. Check [doc/possession.txt](./doc/possession.txt)
Expand Down
Loading