Skip to content
Discussion options

You must be logged in to vote

I think the current buffer isn't updating It's either that or the data is being made stale somewhere that I haven't found as yet

so the current buffer info was not consistent
I fetched it before calling the custom picker and passed that info to it
That did the trick. Thanks alot for your help

 keymap.set("n", "<leader>ls", function() 
    local currBuf = vim.api.nvim_get_current_buf()
    local currFilePath = vim.api.nvim_buf_get_name(currBuf)
    local currBufName = vim.fn.fnamemodify(currFilePath, ":t")
    local currBufData = { currBuf, currFilePath, currBufName }
    return open_custom_buffer(currBufData) 
end, opts)

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@Emille1723
Comment options

@Emille1723
Comment options

@ibhagwan
Comment options

@Emille1723
Comment options

Answer selected by Emille1723
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants