reddit / emacs

Incomplete docs with LSP

Only-Adhesiveness889 · 2022-03-01 10:32
Hello reddit, its me again. I have switched to `lsp-pyright` and everything is fine except Python documentation functionalities. I wondered if anyone has the same problem as me and I hope that someone can give me some pointers on how to fix this. The problem I have is that `lsp-doc-show` and `company-show-doc-buffer` return incomplete results for many builtins and many numpy functions. Envoking these commands on `list` for example returns class list() and nothing more. I have tried quite a lot and I am pretty confident that it has to do with LSP itself or my LSP setup because `anaconda-mode-show-doc` yields builtins list() list(iterable: Iterable[_T]) Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. which is what I want from LSP. Any ideas?
cathedral_mistreat · 2022-03-01 10:59
I'm also underwhelmed by the documentation given by pyright. This post inspired me to look at https://github.com/emacs-lsp/lsp-python-ms which gives some more documentation: list() Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. Pylance, only available in vscode, also gives the above snippet. lsp-python-ms uses microsoft/python-language-server, which is apparently different from microsoft/pyright. I don't know how they relate.
Only-Adhesiveness889 · 2022-03-01 12:14
thanks. mspyls is deprecated and I had the same issue before when I was using it.
cathedral_mistreat · 2022-03-01 19:13
Dang! Another alternative then. Have you tried lsp-jedi? It also seems to give proper docs.