python-language-server
python-language-server copied to clipboard
Support pyright
Thank you for this awesome tool!
pyright is a static type checker for Python. It is typically 5x or more faster than mypy and other type checkers that are written in Python.
Maybe faster, but i think author choose right tool as mypy will work fine. If you need better performance, then look at MS Python Server. I am currently looking in projects which doesn’t uses Microsoft products/apps, this project well made
Also want to know if it is in the roadmap.
In case you didn't know, Pyright is also a language server nowadays (it powers microsoft/pylance). So you can just use it instead of python-language-server.
$ pyright-langserver --stdio
@lithammer How would you install/configure pyright to use it with kak-lsp
? pyright-langserver --stdio
is in my path and added something like this to my kak-lsp.toml
(but I'm just guessing here):
[language.python]
filetypes = ["python"]
roots = [".git"]
command = "pyright-langserver --stdio"
@ivanddm no sorry, I don't use Kakoune. But by looking at the sample kak-lsp.toml in the repo I would guess something like this:
[language.python]
filetypes = ["python"]
roots = ["requirements.txt", "pyproject.toml", "setup.py", ".git"]
command = "pyright-langserver"
args = ["--stdio"]
It's unclear if you also need offset_encoding = "utf-8"
.
@lithammer thanks for that... I tried what you suggest as well with and without offset_encoding = "utf-8"
but still it is not picking up the server when opening python files... I'm going to raise this question in kak-lsp
repo.
Thanks again!