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

Unable disable delete_hidden_buffers setting #25

Closed
0-th opened this issue Feb 21, 2023 · 2 comments
Closed

Unable disable delete_hidden_buffers setting #25

0-th opened this issue Feb 21, 2023 · 2 comments

Comments

@0-th
Copy link

0-th commented Feb 21, 2023

I have looked into #18, and set delete_hidden_buffers to false and delete_buffers to true. But the behaviour still persists regardless.
My config:

local possess_status_ok, possession = pcall(require, "possession")
if not possess_status_ok then
    vim.notify("Unable to require possession")
    return
end

possession.setup {
    autosave = {
        current = true
    },
    commands = {
        save = 'SSave',
        load = 'SLoad',
        delete = 'SDelete',
        list = 'SList',
        close = 'SClose',
        show = 'SShow',
        migrate = 'SMigrate',
    },
    delete_hidden_buffers = false, -- Remove the deletion of hidden buffers without windows
    delete_buffers = true, -- Delete all buffers before loading another session
}

-- Telescope integrations
local tele_status_ok, telescope = pcall(require, "telescope")
if not tele_status_ok then
    vim.notify("Unable to require telescope for possession plugin")
    return
end

telescope.load_extension('possession')
@jedrzejboczar
Copy link
Owner

Your configuration is missing the plugins key, you should use:

possession.setup {
    autosave = {
        current = true
    },
    commands = {
        save = 'SSave',
        load = 'SLoad',
        delete = 'SDelete',
        list = 'SList',
        close = 'SClose',
        show = 'SShow',
        migrate = 'SMigrate',
    },
    plugins = {
        delete_hidden_buffers = false, -- Remove the deletion of hidden buffers without windows
        delete_buffers = true, -- Delete all buffers before loading another session
    },
}

I might have forgotten to add this when commenting on #18. Please check https://github.com/jedrzejboczar/possession.nvim#configuration and possession.txt for reference.

@0-th
Copy link
Author

0-th commented Feb 22, 2023

Sorry, for the oversight. Including the plugins fixes the issue. Thanks for developing this awesome plugin

@0-th 0-th closed this as completed Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants