Python language servers revisited

Back in December 2022, I posted:

I’m posting again with more or less the same question, because I recently upgraded my neovim config (which was just using ruff and pydocstyle), and in that process neovim (lunarvim, actually) switched me back to pyright. Fortunately, I was exploring that on a personal machine, not the one I do my day-to-day work development on.

Has pyright gotten faster since late 2022? I heard there is now a for-fee collection of python types that are supposed to speed things up - I am uninterested in buying it or using it.

Googling for “fast python language server” brings up pylyzer as the top hit today. Does anyone have experience with it? How well does it work, and does it more or less require type annotations (we have few of them at this point).

For speed, is ruff still the best way to get linting?

And is there anything out there that can do tab completion of symbols, in a large project? Ruff does not appear to supply this.


How large is a large project, for you?

Your last post in the previous thread mentioned you were using python-lsp-server. It’s what comes with Spyder (which I use), and seems to work reasonably well for me on large-ish projects (the biggest project I’ve worked on routinely with it is maybe ten thousand loc across a few dozen modules).

Is python-lsp-server not getting the job done?

1 Like

The biggest git repo is about 70K lines.

python-lsp-server is reasonable, but as I mentioned upgrading lunarvim has switched me back to pyright, so it seemed an opportune moment to reevaluate.

Thanks for the response.

I decided to give ruff_lsp a try. It seems much faster than pyright was on my work Mac (it was still very lethargic), and although I haven’t tried tab-complete across files yet, ruff_lsp appears to support tab-complete in at least some form.