Description
Hi, I'm fairly unfamiliar with ruff and formatting in general, and so I'm trying to understand how to control its behaviour.
I have this configuration:
"pylsp.plugins.ruff.enabled": true,
"pylsp.plugins.ruff.extendSelect": ["E", "D", "C90", "I"],
"pylsp.plugins.ruff.ignore": ["E265"],
"pylsp.plugins.ruff.format": ["D"],
"pylsp.plugins.ruff.preview": true,
"pylsp.plugins.ruff.lineLength": 79,
Then, I introduce this typo: a = 1
. This gets correctly signaled by ruff with E221 (this code requires preview
). However, when I run the command :call CocAction('format')
this error gets fixed. This is not what I expect, the error should not be fixed because this family of errors is not explicitly indicated in the ruff.format
option. This does seem to work for I
errors, though.
Am I doing anything wrong or is this the expected behaviour? To be honest, I'm not even sure if :call CocAction('format')
is the correct way to invoke ruff format
.
Thanks for the the help and more generally for this great plugin!