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

Check on width for nvim_open_win failing #41

Open
cempassi opened this issue Oct 19, 2023 · 0 comments
Open

Check on width for nvim_open_win failing #41

cempassi opened this issue Oct 19, 2023 · 0 comments

Comments

@cempassi
Copy link

cempassi commented Oct 19, 2023

In lua/hover/util.lua, there is a check to see if there is a width, and if not do some things to define one.

if not width then
width = 0
for i, line in ipairs(contents) do
line_widths[i] = vim.fn.strdisplaywidth(line)
width = math.max(line_widths[i], width)
end
end

I'm currently using Hover with nvim-jdtls.
On java files, on symbols with no return from lsp, width is still at 0, resulting in an error every time I use K with the following message:
Error executing vim.schedule lua callback: ....hover.nvim/lua/hover/async.lua:37: The coroutine failed with this message: .../hover.nvim/lua/hover/util.lua:316: 'width' key must be a positive Integer

vim.lsp.buf.hover() just says 'no information available' with no errors

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

1 participant