-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
LSP: textDocument/hover is not working correctly in neovim #87192
Comments
I use neovim and I'm able to see the For what it's worth, my neovim configuration does not pipe the TCP connection and connects directly to it. I'm currently using the LazyVim setup and in my custom plugin specification, this is what I have related to LSP and GDScript: -- add servers through lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
-- ---@type lspconfig.options
servers = {
gdscript = {}, -- NOTE: To change the port, you need to set an environment variable GDScript_Port to the port number.
},
},
},
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"gdscript",
},
},
}, |
Interesting. It does work with fresh LazyVim and this set-up, but not with the Also, connecting directly does work for my set-up too. So the LSP does work, but the documentation should be made more obvious on how to set it up. Currently there is no other way than to Google and find random bits and pieces (that are usually outdated). I think this could be closed? Potentially moved as a documentation issue? |
I suppose it doesn't work with the pipe because the client probably expects to receive newlines between the JSONs because it's simulating an I've opened godotengine/godot-docs#8779 to track this documentation issue. Closing. |
Tested versions
System information
Godot v4.2.1.stable - macOS 14.2.1 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)
Issue description
LSP seems to (still) be working correctly only in VSCode, as previously discussed in #34523. The issue was closed with "please raise issues in editor extensions repos" but this is a basic LSP feature and does not use any extension, so I'll raise it here.In neovim the call
vim.lsp.buf.hover()
is what is used by the editor to call the "show me hover tooltip for this thing under cursor", literally the equivalent of hovering your mouse over something in VSCode. Unfortunately, it seems the LSP isn't responding correctly totextDocument/hover
called from other editors than VSCode.The VSCode extension also uses the same LSP command here.
Which results in this:
However, in Neovim (despite LSP clearly connecting and working, as I have autocompletion, diagnostics, errors and documentation), trying to call
textDocument/hover
throughvim.lsp.buf.hover()
just returns "no manual entry for Node". This happens when neovim cannot get anything from LSP server and tries to go for manfiles.Steps to reproduce
.gdscript
file and verify that LSP is connected with:LspInfo
(you should see Godot LSP in there), you should also have autocompletion working now.vim.lsp.buf.hover()
when hovering over something like "Node3D", usually the default keybind isShift+K
.Minimal reproduction project (MRP)
N/A.
The text was updated successfully, but these errors were encountered: