Closed componhead closed 1 month ago
You probably meant to use builtin.git_files
instead of builtin.buffers
?
Is cwd
a valid option for builtin.buffers
?
Hmm, seems that cwd
is a valid option for builtin.buffers
, from my testing I think it needs to be an absolute path.
https://github.com/nvim-telescope/telescope.nvim/blob/master/doc/telescope.txt
builtin.buffers({opts}) *telescope.builtin.buffers()*
Lists open buffers in current neovim instance, opens selected buffer on
`<cr>`
Parameters: ~
{opts} (table) options to pass to the picker
Options: ~
{cwd} (string) specify a working directory to
filter buffers list by
@componhead is your issue that preview is not showing up, or you don't get a list of buffers at all? For preview to show up the terminal needs to be at least 120 columns wide otherwise the preview is not shown. The min width can be configured, or the layout changed so that the preview is split in vertical.
The issue is that I cannot see the preview. Maybe the current asciinema can help:
https://asciinema.org/a/2K3fzdzAnyf5bC1gz8Uaw3CUG
thank you
Ok I see and can reproduce the issue, here's a snippet that I used to reproduce:
vim.keymap.set('n', '<leader>1', function()
builtin.buffers { cwd = vim.fn.getcwd() .. '/lua/', prompt_title = 'Find lua/ buffers', sort_mru = true, silent = true }
end, { desc = 'Find lua buffers' })
So Telescope shows the list of buffers and opens a preview window but it's empty.
If I remove the cwd
parameter then the preview works fine.
This is definitely a Telescope issue, nothing to do with kickstart so it would be best if you report the issue there:
https://github.com/nvim-telescope/telescope.nvim
Thank you for the feedback.
Hi. Adding this to init.lua, telescope preview doesn't works
Am I using it correctly? Maybe a telescope issue?