Skip to content

feat: define scroll speed + smart_send to qflist#610

Merged
elianiva merged 7 commits intonvim-telescope:masterfrom
elianiva:feat/scroll_speed
Mar 5, 2021
Merged

feat: define scroll speed + smart_send to qflist#610
elianiva merged 7 commits intonvim-telescope:masterfrom
elianiva:feat/scroll_speed

Conversation

@elianiva
Copy link
Copy Markdown
Member

@elianiva elianiva commented Mar 5, 2021

continuing @Conni2461's work #606

you can now do something like this to customise the scrolling speed, the default is preview_height / 2

layout_defaults = {
  horizontal = {
    scroll_speed = 5
  },
  vertical = {
    scroll_speed = 2
  },
}

Comment thread lua/telescope/actions/init.lua Outdated
Comment thread lua/telescope/actions/set.lua Outdated
--- Scrolls the previewer up or down
---@param prompt_bufnr number: The prompt bufnr
---@param direction number: The direction of the scrolling
-- Valid directions include: 1 or -1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI Multiline param currently not possible with tree-sitter-lua See tjdevries/tree-sitter-lua#14 (comment)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I should try that grammar as well, been wanting to try that but I always forgot :D

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't recommend it quite yet. I am using a quite out of date nvim-treesitter to make it work.
I would wait until overriding a query is easier in nvim-treesitter and the queries for that grammar need some work too.

The only thing that you would gain from it is the emmy documentation part and you can play with docgen which is super cool :)

@Conni2461
Copy link
Copy Markdown
Member

2 things about action docs:

  1. There is this: Add documentation for some actions #587 I just don't wanna take away his first PR. Sorry i know you spend time documenting actions/init.lua. We can keep the set.lua documentation :)
  2. We have the max query issue until neovim is using tree sitter 0.19.0 and tj regenerated grammar See Maximum Results for Query? nvim-treesitter/nvim-treesitter#963

@elianiva
Copy link
Copy Markdown
Member Author

elianiva commented Mar 5, 2021

sure, I can remove them. I didn't spend that much time, it's just a lot of copypaste because I was thinking why not? 😆
and also, I should try to remember more of these PRs, I saw that PR but my brain couldn't remember it for some reason

Copy link
Copy Markdown
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 for picking it up :)

@elianiva elianiva merged commit 6e941e0 into nvim-telescope:master Mar 5, 2021
@elianiva elianiva deleted the feat/scroll_speed branch March 5, 2021 13:13
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