Skip to content

feat(git_status): allow buffer_previewer_maker to receive options#2833

Merged
Conni2461 merged 3 commits into
nvim-telescope:masterfrom
atusy:git_file_diff
Jan 23, 2024
Merged

feat(git_status): allow buffer_previewer_maker to receive options#2833
Conni2461 merged 3 commits into
nvim-telescope:masterfrom
atusy:git_file_diff

Conversation

@atusy

@atusy atusy commented Dec 28, 2023

Copy link
Copy Markdown
Contributor

Description

When peviewing new files with git_status, binary files show noises.
This is because the current previewer does not inherit global- or user-options.

My PR passes the option to previewer.
This can be considered as fix and new feature at the same time.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

  • Preview of an image file shows Binary cannot be previewed message.

Configuration:

  • Neovim version (nvim --version):
NVIM v0.10.0-dev-1962+gc26dc1f77
Build type: RelWithDebInfo
LuaJIT 2.1.1703358377
Run "nvim -V1 -v" for more info
  • Operating system and version:

Manjaro Linux

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

so that previwer hooks work.
For example, this avoids noisy previewer from binary files.
Comment thread lua/telescope/previewers/buffer_previewer.lua Outdated
@atusy
atusy requested a review from Conni2461 January 23, 2024 02:37
@Conni2461

Copy link
Copy Markdown
Member

can you apply this to all buffer_previewer_maker in that file? i dont wanna do multiple PRs for basically the same change 😅 thanks :) after that this can be merged

@atusy

atusy commented Jan 23, 2024

Copy link
Copy Markdown
Contributor Author

Alright! Thank you for the suggestion. Should be okay now!

@Conni2461

Copy link
Copy Markdown
Member

thanks :)

@Conni2461
Conni2461 merged commit 301505d into nvim-telescope:master Jan 23, 2024
Conni2461 pushed a commit that referenced this pull request Mar 11, 2024
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.

2 participants