python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 186 forks source link

"No information available" when calling `vim.lsp.buf.hover` #506

Closed HairlessVillager closed 6 months ago

HairlessVillager commented 6 months ago

First of all, I appreciate your efforts in maintaining this project.🥰 The following issue may seem trivial, but I have not been able to solve it after checking many documents. If it has taken up your valuable time, I apologize.

I have bound the 'K' key to the vim.lsp.buf.hover function using vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts). However, when I press the 'K' key, NeoVim displays "No information available" at the bottom, regardless of whether the cursor is on a variable name or keyword. This issue persists even after using :LspRestart.

screenshots

I have adjusted the log level of lsp.log to DEBUG. Here is a typical log snippet:

lsp.log

The code in the buffer and the configuration file are as follows:

test_simple.py

nvim-lspconfig.lua

I am using the Windows 10 and NeoVim version 0.9.4.

HairlessVillager commented 6 months ago

I'm not entirely sure if this issue should be raised here, but when I enable the jedi_language_server, the hover window appears again (of course, this is because of jedi_language_server), but "No information available" still appears at the bottom. So I think this might be a bug in pylsp.

HairlessVillager commented 6 months ago

Oh, maybe this is a duplication of #444.