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

entry_maker option doesn't seem to work. #4

Open
Rizhiy opened this issue Jan 20, 2024 · 0 comments
Open

entry_maker option doesn't seem to work. #4

Rizhiy opened this issue Jan 20, 2024 · 0 comments

Comments

@Rizhiy
Copy link

Rizhiy commented Jan 20, 2024

Hi, I use folke/persistence.nvim for saving my sessions, so their filenames are a bit ugly (e.g. %home%rizhiy%.local%state%nvim%sessions.vim).
I thought that I can modify how they are displayed using entry_maker options, but it doesn't seem to be working.
Here is my attempt:

extensions = {
    xray23 = {
        sessionDir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"),
        entry_maker = function(entry)
            return {
                value = entry,
                display = entry:match("[^%%]*$"):sub(1, -5),
                ordinal = entry[1],
            }
        end,
    },
},

What am I doing wrong?

I tried using vim.print() to debug, but it seems the function is not even being called.

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

1 participant