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

ruff version update #18

Closed patillacode closed 1 year ago

patillacode commented 1 year ago

Hi!

Thanks for this project!

A bit of context:

Questions:

Am I approaching this the right way?

Is there a less convoluted way for me to point the executable to my local version of ruff while versions catch up?

I tried to do it via the path setting but I guess I am doing it wrong:

This is one of my last (unsuccessful) tries the LSP-ruff.sublime-settings file:

{
    "initializationOptions": {
        "globalSettings": {
            // same as settings
            "path": ["/usr/local/bin/ruff"],
        },
    },
}

That's it, I'll patiently wait for a response!

rchl commented 1 year ago

Updating ruff dependency in ruff-lsp as you did is the way to go. We'll get dependabot notification at some point later and will bump the ruff version through that.

As far as using custom ruff binary, this seems to work for me:

// Settings in here override those in "LSP-ruff/LSP-ruff.sublime-settings"
{
    "initializationOptions": {
        "settings": {
            "path": ["/opt/homebrew/bin/ruff"]
        },
    }
}

Not sure why globalSettings doesn't work.

rchl commented 1 year ago

Fixing the issue with not respecting globalSettings in https://github.com/sublimelsp/LSP-ruff/pull/19

patillacode commented 1 year ago

Great, thanks!

I could swear I had tried your example settings and it failed, but it is now working!

rchl commented 1 year ago

Released https://github.com/sublimelsp/LSP-ruff/releases/tag/1.0.5