Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll in hover without enter #161

Closed
lvim-tech opened this issue Oct 29, 2022 · 8 comments
Closed

Scroll in hover without enter #161

lvim-tech opened this issue Oct 29, 2022 · 8 comments

Comments

@lvim-tech
Copy link

How to scroll in lsp hover without enter? In lsp signature too. Thanks.

@folke

This comment was marked as outdated.

@lvim-tech
Copy link
Author

lvim-tech commented Oct 29, 2022

require("noice.source.lsp").scroll(n) - is this defined?

@folke
Copy link
Owner

folke commented Oct 29, 2022

Damn, should be without source. Will fix the docs!

@folke
Copy link
Owner

folke commented Oct 29, 2022

https://github.com/folke/noice.nvim#lsp-hover-doc-scrolling

  vim.keymap.set("n", "<c-f>", function()
    if not require("noice.lsp").scroll(4) then
      return "<c-f>"
    end
  end, { silent = true, expr = true })

  vim.keymap.set("n", "<c-b>", function()
    if not require("noice.lsp").scroll(-4) then
      return "<c-b>"
    end
  end, { silent = true, expr = true })

@gennaro-tedesco
Copy link

Excuse me for commenting on a closed issue: using the above I get "attempt to call a nil value (scroll)", which leads me to think the scroll method isn't exported out from noice.lsp (init.lua) module? Is this working for other users, am I making a silly mistake in the configuration?

folke added a commit that referenced this issue Nov 10, 2022
@folke
Copy link
Owner

folke commented Nov 10, 2022

@gennaro-tedesco my bad. Did some refactoring on the lsp code and forgot to export the scroll function. Should be fixed now

@gennaro-tedesco
Copy link

While I no longer see the error now, I also do not get the scrolling motion in the hover. Is it working for you? Or perhaps I misunderstood: this is for the hover K, namely hover on function and scroll (not for the completion menu window, whose scrolling is working fine), is it not?

@folke folke mentioned this issue Nov 10, 2022
@folke
Copy link
Owner

folke commented Nov 10, 2022

@gennaro-tedesco please see #210

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

No branches or pull requests

3 participants