Open jhossbach opened 1 year ago
i am curious to ask if this can offer 'additionalTextEdits' which offer auto-fix for auto-import when writing a method but did not import it yet.
That depends on whether ruff
supports this kind of action. I couldn't find any immediate support for that, but as far as I know rope
(and thus pylsp-rope
) supports this.
shane.xb.qian
You could create a feature request issue on ruff's github but i think the idea of ruff is to stay on providing linting features rather than code reformat actions. Nevertheless it might be worth the try.
With #25 being merged soon, the question remains whether formatting should be enabled by default and error codes should be given to be auto-fixed when running formatting. I don't really mind on or the other, so I'm open to suggestions.
If e.g. isort-codes should be used for formatting per default, we should also disable
pylsp-isort
.