Skip to content

Conversation

@jamestrew
Copy link
Contributor

According to :h telescope.defaults.preview, we should be able to do preview=false to disable the previewer for pickers. With how picker options resolve inheritance, something like this should work.

require('telescope').setup {
  defaults = { preview = true },
  pickers = { find_files = { preview = false } }
}

Here, find_files should not show a previewer but it previously would.

Corrects this by checking if opts.preview is explicitly set to false. In which case, we won't show the previewer.

Closes #3325

@weisbrja

This comment was marked as off-topic.

@weisbrja

This comment was marked as duplicate.

@weisbrja

This comment was marked as duplicate.

@weisbrja

This comment was marked as duplicate.

According to `:h telescope.defaults.preview`, we should be able to do
`preview=false` to disable the previewer for pickers. With how picker
options resolve inheritance, something like this should work.

```lua
require('telescope').setup {
  defaults = { preview = true },
  pickers = { find_files = { preview = false } }
}
```
Here, find_files should not show a previewer but it previously would.

Corrects this by checking if `opts.preview` is explicitly set to
`false`. In which case, we won't show the previewer.

Closes nvim-telescope#3325
@Conni2461 Conni2461 force-pushed the preview-opt-inheritance branch from ed7972e to f745b61 Compare November 7, 2025 08:18
Copy link
Member

@Conni2461 Conni2461 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@Conni2461 Conni2461 enabled auto-merge (squash) November 7, 2025 08:19
@Conni2461 Conni2461 merged commit 5497127 into nvim-telescope:master Nov 7, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

preview flag does not get overriden (for find_files picker)

3 participants