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

path/interpreter settings ignored? #61

Open
asparc opened this issue Jun 12, 2024 · 2 comments
Open

path/interpreter settings ignored? #61

asparc opened this issue Jun 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@asparc
Copy link

asparc commented Jun 12, 2024

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
Copy link
Member

rchl commented Jun 12, 2024

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.

@rchl rchl added the enhancement New feature or request label Jun 12, 2024
@asparc
Copy link
Author

asparc commented Jun 13, 2024

Alright, thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants