You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have multiple providers with hover capability for the same buffer, the hover will ramdonly display one of them (same with vim.lsp.hover).
I found a way to work around this by implementing a custom provider that takes the server_name as argument, using it to both print the title and request textDocument/hover for a single client each time.
The trick was to create and register a new provider on server attach, to be able to split the results while keeping a reference to the name.
Since this happens on on_attach event, I'm not sure it can be easily included in the original code, but it would be nice to have.
If we have multiple providers with
hover
capability for the same buffer, the hover will ramdonly display one of them (same withvim.lsp.hover
).I found a way to work around this by implementing a custom provider that takes the
server_name
as argument, using it to both print the title and requesttextDocument/hover
for a single client each time.The trick was to create and register a new provider on server attach, to be able to split the results while keeping a reference to the name.
Since this happens on
on_attach
event, I'm not sure it can be easily included in the original code, but it would be nice to have.Here is the implementation and result:
https://github.com/paulodiovani/dotfiles/blob/4eb17e19b113b32f3fd6da2c7357d26958056edb/home/user/.config/nvim/lua/completion.lua#L5-L29
Screenshots:
First posted on neovim/nvim-lspconfig#3282 (comment)
The text was updated successfully, but these errors were encountered: