Skip to content

feat(buffer_previewer): expose scroll_fn()#3362

Open
karb94 wants to merge 1 commit intonvim-telescope:masterfrom
karb94:master
Open

feat(buffer_previewer): expose scroll_fn()#3362
karb94 wants to merge 1 commit intonvim-telescope:masterfrom
karb94:master

Conversation

@karb94
Copy link

@karb94 karb94 commented Nov 10, 2024

Description

I am the author of Neoscroll, a smooth scrolling plugin. Some of my users requested support for Telescope's buffer previews #79. This PR exposes the scroll_fn() function from buffer_previewer.lua to allow the function to be overwritten by the user or by extensions. This will enable Neoscroll to use its own scrolling function to scroll preview buffers by default.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  1. Install Telescope with this PR
  2. Run any telescope command with buffer preview
  3. Scroll the buffer preview

Configuration:

  • Neovim version (nvim --version): 0.10.2
  • Operating system and version: NixOS 24.11

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)

@TheNoeTrevino
Copy link

Merge this please!!!

@Conni2461
Copy link
Member

we dont do integrations of other plugins here! For stuff like this we invented telescope extensions. Treesitter and devicons are the exception to this rule. So we will not merge this as is.

Although i am not opposed to changing interfaces so this can be achieved with configuration. And then the community can provide a thin telescope-extensions that reduces the need for the configuration. if that makes sense to you

@karb94
Copy link
Author

karb94 commented Dec 7, 2024

Thanks @Conni2461, this makes sense. would it be acceptable to expose scroll_fn() to the global config? Another (IMO more awckward) option would be to expose previewers.new_buffer_previewer() so that I can make sure it always gets my scroll_fn()

@karb94 karb94 changed the title feat(buffer_previewer): add Neoscroll support feat(buffer_previewer): expose scroll_fn() Dec 8, 2024
@karb94
Copy link
Author

karb94 commented Dec 8, 2024

I changed the PR to expose scroll_fn() instead. Let me know what you think.

@karb94
Copy link
Author

karb94 commented Jan 21, 2025

@Conni2461 are these new changes acceptable?

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.

3 participants