Skip to content
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

Experiment with Pylyzer as Python language server #48

Closed
jinnovation opened this issue Mar 28, 2024 · 4 comments
Closed

Experiment with Pylyzer as Python language server #48

jinnovation opened this issue Mar 28, 2024 · 4 comments

Comments

@jinnovation
Copy link
Owner

Historically have used python-lsp-server. For whatever reason (maybe misconfiguration on my part?) this has always required me to reinstall the language server package on each virtualenv that I set up for my projects (otherwise stuff like jump-to-def doesn't work). To make things worse, I've always needed to install all companion "extensions" to the language server as well, including:

This is extremely cumbersome past a small handful of Python codebases.

Pylyzer looks like a promising alternative that might have a less finicky install story. If that proves to be the case, replace current use of python-lsp-server with that.

@jinnovation
Copy link
Owner Author

Downside is that Pylyzer does not appear to support import sorting natively. Maybe this is an acceptable tradeoff.

@jinnovation
Copy link
Owner Author

Pylyzer does not appear to support local package resolution e.g. in virtualenvs (mtshiba/pylyzer#22), which might be a non-starter.

@jinnovation
Copy link
Owner Author

Alternatively, Homebrew/homebrew-core#139195 added several of the optional extensions, e.g. for Black and Mypy, to the Homebrew recipe for python-lsp-server. Let's try using that to install python-lsp-server first and see how things like local package discovery work w/ the Homebrew-installed version.

jinnovation added a commit that referenced this issue Mar 28, 2024
This never actually worked. Plus, as noted in #48, the Homebrew recipe for
`python-lsp-server` installs several (not all) of my desired extensions
alongside the main server itself. Assuming the Homebrew "version" of
`python-lsp-server` "works" (e.g. does jump-to-def'n for virtualenv packages as
well), then that obviates the need for this bespoke Docker-language-server thing
entirely.
@jinnovation
Copy link
Owner Author

Closing in favor of #49.

@jinnovation jinnovation closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant