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

bug: signature_help covers the current line #930

Open
4 tasks done
s1n7ax opened this issue Aug 12, 2024 · 9 comments
Open
4 tasks done

bug: signature_help covers the current line #930

s1n7ax opened this issue Aug 12, 2024 · 9 comments
Labels
bug Something isn't working stale

Comments

@s1n7ax
Copy link

s1n7ax commented Aug 12, 2024

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.11.0-nightly+b991319

Operating system/version

NixOS

Describe the bug

I have noticed this issue for a quite some time on LazyVim. I don't use any custom configuration for noice.nvim.

When filling parameters, signature_help is being automatically triggered and the popup covers the current line in Normal mode and in insert mode.

I can recreate this behavior with

  • vim.lsp.buf.hover()
  • vim.lsp.buf.signature_help()
  • inserting params
2024-08-12_13-36-52.mp4

After disabling Noice.nvim, the popup is displayed correctly.

image

I can see people have had the same issue, but solutions suggests to disable the feature.
https://www.reddit.com/r/neovim/comments/ymdb5u/comment/iyhnxgy/?context=3
https://www.reddit.com/r/neovim/comments/12i9a3o/how_to_avoid_popup_covering_cursor_in_insert_mode/

Steps To Reproduce

  1. Open a lua file
  2. Use a function that has a big documentation

Expected Behavior

Pop up should be opened without covering the current line. Overflow should be scrollable.

Repro

No response

@s1n7ax s1n7ax added the bug Something isn't working label Aug 12, 2024
@max397574
Copy link
Contributor

I guess you could really just disable the functionality since something really similar (exactly the same?) is done in core now anyways.

If you don't want that you should try to create a minimal repro.

@s1n7ax
Copy link
Author

s1n7ax commented Aug 12, 2024

@max397574 Disabling hover and signature also removes it being auto triggered. There is some more highlights available in noice.nvim compared to the native. Mostly I miss auto trigger.

@max397574
Copy link
Contributor

simply create an autocmd for it

vim.api.nvim_create_autocmd({ "TextChangedI", "TextChangedP", "InsertEnter" },{
  callback=function()
    vim.lsp.buf.signature_help()  
  end
})

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Sep 12, 2024
@dpetka2001
Copy link

You could just set the max_height of the message to be proportional to the window height. Something like

{
  "folke/noice.nvim",
  opts = {
    lsp = {
      signature = {
        opts = {
          size = {
            max_height = vim.api.nvim_win_get_height(0) / 2,
          },
        },
      },
    },

  }
}

should work I believe.

@github-actions github-actions bot removed the stale label Sep 15, 2024
@EricDriussi
Copy link

EricDriussi commented Sep 19, 2024

Hi there! I would also rather keep using noice for consistency with the rest of the UI.

Unfortunately the code from the comment above produces an error (Number is not an integer) and even if it did work it would break as soon as the split or window is resized. Plus this happens with width as well.

It seems to me that it might have something to do with positioning. For example even if it does fit in the window as a whole, as soon as it overflows the split it gets bumped to the top of the window.

image

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added stale and removed stale labels Oct 20, 2024
@s1n7ax
Copy link
Author

s1n7ax commented Oct 22, 2024

.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants