Skip to content

Conversation

aaronhallaert
Copy link
Owner

⚠️ only affects Telescope extension

Advantages:

  • highlight search
  • similar to builtin telescope git pickers

Disadvantages:

  • Removes support for pagers

@aaronhallaert aaronhallaert self-assigned this Jul 30, 2024
@aaronhallaert aaronhallaert linked an issue Jul 30, 2024 that may be closed by this pull request
@aaronhallaert aaronhallaert added enhancement New feature or request breaking-change Something will break after this change labels Jul 30, 2024
@aaronhallaert aaronhallaert merged commit 36ea105 into main Aug 19, 2024
@aaronhallaert aaronhallaert deleted the feature/nvim_buffers branch August 19, 2024 09:27
@dudicoco
Copy link

Hi @aaronhallaert,

This commit totally broke the plugin for me - I get no previews at all.
I removed delta from my git config but it did not help.

In addition, I believe this should be an opt in behavior as it's a huge breaking change to prevent everyone from using pagers for previews.

Did you consider using gitsigns for buffer previews?
I'm using this function on normal buffers to display the diff using gitsigns:

M.git_diff_file = function()
	vim.cmd("Gitsigns toggle_deleted")
	vim.cmd("Gitsigns toggle_linehl")
	vim.cmd("Gitsigns toggle_word_diff")
end

@aaronhallaert
Copy link
Owner Author

aaronhallaert commented Aug 28, 2024

@dudicoco I made a release before merging this PR so one can easily go back to the previous behavior. You can "opt out" by downgrading at the moment. I already have to maintain 2 extensions (telescope + fzf), and I will not maintain different previews for both. With this change, I chose to follow the default Telescope git commit behavior.

The reasoning: I received a lot of issues where pagers would cause problems. Therefore, I chose to follow Telescopes default behavior. This was also requested by a user and since it gives me more control over the preview buffer, it is a nice improvement.

Regarding "Gitsigns": I will not add another dependency to this plugin. I really would like to go the other way and remove dependencies as much as possible.

Can you give some extra info about the following things:

  • nvim version
  • telescope version
  • git version

Please make an issue where I can track the bug
If the issue gets enough traction, I could think about reverting this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Something will break after this change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use nvim buffers for preview
2 participants