How to find ruff binary
kaddkaka opened this issue · 2 comments
I have run pylsp and connected from Neovim builtin language server. Previously I got ruff diagnostics just by having ruff installed and available in my $PATH.
But lately I don't seem to get any ruff diagnostics. How can I investigate if pylsp is finding ruff?
Did you install pylsp and pylsp_ruff in a dedicated environment, or did you install it system-wide?
If you know in which venv your pylsp executable comes from, you can enter that venv and check if pylsp_ruff can be imported, e.g. python -c "import pylsp_ruff;print(pylsp_ruff.__file__)". Do the same for ruff.
If both are found, you can try to dig through the pylsp logs for any ERRORs, you can use the configuration in the README: https://github.com/python-lsp/python-lsp-ruff?tab=readme-ov-file#debugging
Thanks for the hold on how to diagnose this!
This type I was able to solve it in a nix shell environment after adding the nixpkgs_py.python-lsp-ruff package.