-
Notifications
You must be signed in to change notification settings - Fork 40
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
Telescope Preview #79
Comments
Any progress? |
Planned but not much progress yet |
Unfortunately, for this to work out of the box with the default telescope buffer previewers I need Telescope to allow Neoscroll to replace their default The local builtin = require("telescope.builtin")
local previewers = require("telescope.previewers")
local from_entry = require("telescope.from_entry")
local conf = require("telescope.config").values
local neoscroll = require('neoscroll')
local my_previewer = function(opts)
return previewers.new_buffer_previewer({
scroll_fn = neoscroll.telescope_scroll_fn,
define_preview = function(self, entry)
local p = from_entry.path(entry, true, false)
if p == nil or p == "" then
return
end
conf.buffer_previewer_maker(p, self.state.bufnr, {
bufname = self.state.bufname,
winid = self.state.winid,
preview = opts.preview,
file_encoding = opts.file_encoding,
})
end,
})
end
local function my_picker(opts)
local opts = opts or {}
opts.previewer = my_previewer(opts)
builtin.buffers(opts)
end
my_picker()
|
How to enable this to work in preview window of other programs like telescope
The text was updated successfully, but these errors were encountered: