Skip to content

Conversation

RafaelZasas
Copy link
Contributor

@RafaelZasas RafaelZasas commented Mar 12, 2024

I have added control-u and control-d to scroll the auto completion window up and down respectively.

For the average new kickstart user, this will give them the ability to scroll documentation without a mouse and keyboard.

I am fond of reading documentation from the autocomplete window and being able to scroll the window without a mouse is a must have for my setup, I believe it may be the same for many others.

@feoh
Copy link
Collaborator

feoh commented Mar 12, 2024

Hi.

  1. Your PR has no description. Please give us some background on why you want this and what it will do for the average new Neovim kickstart user.
  2. Please ensure that your change is formatted with Stylua or that check will fail.

@RafaelZasas
Copy link
Contributor Author

Hi.

  1. Your PR has no description. Please give us some background on why you want this and what it will do for the average new Neovim kickstart user.
  2. Please ensure that your change is formatted with Stylua or that check will fail.

Thanks for the feedback- I was editing the file directly on github, do I need to pull my fork and format in neovim? I just kinda did an eyeball on the tab spacing but things got a bit weird somewhere.

@feoh
Copy link
Collaborator

feoh commented Mar 12, 2024

Hi.

I don't mean to be dismissive about this but - So you submitted this PR without ever testing it locally?

Please:

  1. Test your proposed code changes thoroughly.
  2. Ensure that they are formatted with the Stylua formatter. You can see the failing check with details.

Thanks.

@dam9000
Copy link
Contributor

dam9000 commented Mar 12, 2024

Perhaps worth mentioning, the cmp recommended keymaps for this are:
https://github.com/hrsh7th/nvim-cmp?tab=readme-ov-file#recommended-configuration

      ['<C-b>'] = cmp.mapping.scroll_docs(-4),
      ['<C-f>'] = cmp.mapping.scroll_docs(4),

This is also what was in kickstart before the 2024 rewrite:

git blame init.lua | grep scroll_docs
e39a8bce (Ari Pollak  2023-12-21      ['<C-b>'] = cmp.mapping.scroll_docs(-4),
^4c4096c (TJ DeVries  2022-06-23      ['<C-f>'] = cmp.mapping.scroll_docs(4),

@RafaelZasas
Copy link
Contributor Author

Perhaps worth mentioning, the cmp recommended keymaps for this are: https://github.com/hrsh7th/nvim-cmp?tab=readme-ov-file#recommended-configuration

      ['<C-b>'] = cmp.mapping.scroll_docs(-4),
      ['<C-f>'] = cmp.mapping.scroll_docs(4),

This is also what was in kickstart before the 2024 rewrite:

git blame init.lua | grep scroll_docs
e39a8bce (Ari Pollak  2023-12-21      ['<C-b>'] = cmp.mapping.scroll_docs(-4),
^4c4096c (TJ DeVries  2022-06-23      ['<C-f>'] = cmp.mapping.scroll_docs(4),

That seems fine to me, I personally prefer up (u) and down (d) but regardless, I think it's generally useful for newcomers who don't know about cmp scrolling.

Will change to use C-b and C-f if that is the consensus.

@dam9000
Copy link
Contributor

dam9000 commented Mar 12, 2024

Right the keys have similar meanings in standard vim:

CTRL-U			Scroll window Upwards in the buffer
CTRL-D			Scroll window Downwards in the buffer

CTRL-B			Scroll window [count] pages Backwards (upwards)
CTRL-F			Scroll window [count] pages Forwards (downwards)

So both options seem fine, but since cmp recommendation is with c-b/c-f I think it's best to follow them.

@tjdevries
Copy link
Member

Since these are cmp recommended, I think it's a good addition to add back in. Thanks!

@tjdevries tjdevries merged commit 452e3a7 into nvim-lua:master Mar 15, 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.

4 participants