sublimelsp / LSP-ruff

LSP helper for ruff - an extremely fast Python linter, written in Rust.

Home Page:https://packagecontrol.io/packages/LSP-ruff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set max number of characters per line?

vgoklani opened this issue · comments

Hey there,

I just did the update on sublime for ruff-lsp, thank you for the black integration!

I noticed that my code now goes beyond the usual 88 characters. I previously used

https://github.com/thep0y/python-black

which automatically rewrote my python code if it extended beyond the limit. Is there a setting in ruff for this? thanks!

Probably best way to configure this is through configuration files in your project. See awesome ruff documentation like https://docs.astral.sh/ruff/formatter/

thanks @rchl

where should that file be located?

Shouldn't the settings be in: Settings -> Package Settings -> LSP -> Servers -> LSP-ruff ?

And you can also do that globally from LSP-ruff settings. Just look on the left column after opening settings and match that structure in your local configuration, adding format options as needed.