python-lsp / python-lsp-server

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

How to find ruff dynamically? #599

Open kaddkaka opened 1 month ago

kaddkaka commented 1 month ago

Let's say I have a system global python-lsp-server installed, is it possible to make it load and get diagnostics from ruff via PATH and also adhering to the project pyproject settings?

For example:

The different version of ruff are "loaded" using nix-direnv when I enter the folder for each project.

python-lsp-ruff seems to install its own version of ruff (0.7.0 as of today), which doesn't match either of the projects. see related issue here: https://github.com/python-lsp/python-lsp-ruff/issues/100