-
Notifications
You must be signed in to change notification settings - Fork 139
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
Documentation not showing #151
Comments
What LSPs have you tested with? Also, you should drop the large |
using JDTLS (java) |
I can confirm that the documentation window is showing up on typescript-react (vtsls) files, but not on java (jdtls) files. Haven't tested other lsp's |
Please try again with ffc4282 |
I faced the same issue as above and I tested with this commit. It works, the documentation window appears but only the signature is shown. |
I can confirm same behaviour from my side. |
I did some debugging to see why no documentation where showing, and why it does show in nvim-cmp. This is the entry table available before attaching documentation to the view, and what I noticed is the item = table: 0x0109a59a58
insertTextFormat = 2
kind = 7
additionalTextEdits = table: 0x0106cd1160
sortText = 999999148
insertText = StringUtils
textEdit = table: 0x0106f12d20
filterText = StringUtils
command = table: 0x0106cd13d0
data = table: 0x0109a59c60
insertTextMode = 2
detail = ext.plantuml.com.google.zxing.common.StringUtils
labelDetails = table: 0x0106b788f8
documentation = table: 0x0106f12c68
kind = markdown
value = Common string-related functions.
* **Author:**
* Sean Owen
textEditText = StringUtils
label = StringUtils I'm not sure the author of nvim-cmp is doing some customization in order to populate I've used the exact same (java) file for testing purposes. I hope this you can give a better explanation on this matter @Saghen than me. |
Maybe this snippet from nvim-cmp is relevant? Thoughts? @Saghen |
Are you folks still running into this issue? Unfortunately I'm unable to setup jdtls on my end so I'm unable to continue without some more info from your end. You might want to try looking at the |
This comment was marked as off-topic.
This comment was marked as off-topic.
I unfortunately am still running into this issue. I am new to configuring Neovim/its plugins, so I cannot help with this - but I can point you to a guide from lsp-zero that can help you set up jdtls (the guide itself doesn't even use lsp-zero). |
This comment was marked as off-topic.
This comment was marked as off-topic.
@windowsrefund Fixed on |
@Saghen I am still seeing the issue. I might try and debug it later by building from source. |
It looks like the capabilities must be passed to jdtls to get it to return the documentation. Is this also the case for require('jdtls').start_or_attach({
capabilities = require('blink.cmp').get_lsp_capabilities(),
...
}) |
@Saghen That was it! I had this cryptic code in my jdtls config so I missed that: local ok_cmp, cmp_lsp = pcall(require, "cmp_nvim_lsp")
cache_vars.capabilities = ok_cmp and cmp_lsp.default_capabilities() So it works on master now. Thanks! |
I'm already doing that but i still get no documentation jdtls = function(opts)
opts.capabilities = require("blink.cmp").get_lsp_capabilities()
return opts
end,
How exactly did you get it to work? |
Not sure if you have already done so, but I had to use the |
Pressing
<C-space
(default keymap) wont show the documentation.I tried setting:
auto_show = true
, but that didn't do the trick either.My config:
The text was updated successfully, but these errors were encountered: