sublimelsp / LSP-ruff

LSP helper for ruff - an extremely fast Python linter, written in Rust.
https://packagecontrol.io/packages/LSP-ruff
MIT License
38 stars 4 forks source link

path/interpreter settings ignored? #61

Open asparc opened 5 months ago

asparc commented 5 months ago

Hi,

I'm not managing to use the path/interpreter settings with LSP-ruff.

Context: I'm on a Windows machine. I have no python executable in my Path. I want ruff to use a specific python env I set up for it. I tried setting the ruff path or python interpreter with all the variations listed below, both in my .sublime-project and in LSP-ruff.sublime-settings, but to no avail:

"initializationOptions": {
    "globalSettings": {
        "path": [
            "C:/Users/.../.conda/envs/ruff/Scripts/ruff.exe",
            "C:/Users/.../.conda/envs/ruff/Scripts"
        ],
        "interpreter": [
            "C:/Users/.../.conda/envs/ruff/python.exe",
            "C:/Users/.../.conda/envs/ruff"
        ],
    },
},

(I know I'm putting it in the right place, as other settings do work as advertised, e.g. lint.enable works.)

Still, I'm getting the following error message: image

When I do put some python executable in my Path, it all works. But isn't the whole purpose of these settings that that is not necessary?

rchl commented 5 months ago

Those settings only affect things that happen within ruff-lsp but the error you are getting happens before ruff-lsp is even started since we are not even able to install ruff-lsp in that case.

It's still a valid feature request but it's not supported now.

asparc commented 5 months ago

Alright, thanks for the clarification!