Line numbers for file preview
Closed this issue · 2 comments
First of all, amazing plugin! I'm loving it.
I was wondering if there is a way to enable line numbers inside the file preview.
For example, I have this auto command for telescope:
-- Show line numbers in the preview
vim.api.nvim_create_autocmd('User', {
pattern = 'TelescopePreviewerLoaded',
group = augroup,
callback = function()
vim.opt_local.number = true
end
})
But I'm not sure what the pattern would be in this case.
Thanks in advance!
Hi @smartinellimarco. I don't think this is possible with a User autocmd at the moment, as there's no filetype on the buffer (which is by design).
I could expose an options for this, though I'm curious what the use-case would be, given that the buffer isn't focusable and you only ever see from the top of the file
@simonmclean I agree it has no value as an option without being able to scroll the preview. It was just a tiny detail I wanted to check if there was a chance to adjust, so don't worry 😄
Thanks!