Skip to content
Discussion options

You must be logged in to vote

Variant 1

picker = {
  sources = {
    files = {  
      on_change = function(picker, item)
        vim.schedule(function()
          picker.preview.win:set_title(item.file)
          -- WARN: `picker.preview:set_title(item.file)` doesn't work
        end)
      end,
picker = {
  sources = {
    files = {  
      on_change = function(picker, item)
        vim.schedule(function()
          picker.preview.title = item.file
          picker:update_titles()
        end)
      end,

Variant 2

For file preview

vim.schedule(function()
  local file = Snacks.picker.preview.file
  Snacks.picker.preview.file = function(ctx)
    local ret = file(ctx)
    if ctx.item.file then
      ctx.picker.preview:s…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@rbhanot4739
Comment options

Comment options

You must be logged in to vote
1 reply
@rbhanot4739
Comment options

Answer selected by rbhanot4739
Comment options

You must be logged in to vote
3 replies
@drowning-cat
Comment options

@kunzaatko
Comment options

@drowning-cat
Comment options

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