Skip to content

Commit

Permalink
docs: add link to #72 describing solution (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrzejboczar authored Jul 15, 2024
1 parent cf77087 commit e3b9d7c
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit e3b9d7c

Please sign in to comment.