Skip to content
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

fix(previewer): preview=false option inheritance #3327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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
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)
1 participant