astral-sh/ruff-vscode

Is there any way to put configuration in vscode settings without a configuration file?

beauxq opened this issue · 2 comments

Is there any way to put configuration (like the link below) in vscode settings without a configuration file (like pyproject.toml)?

https://docs.astral.sh/ruff/settings/#lint_isort_force-sort-within-sections

I would like my settings to go to every computer using settings sync without having to maintain a configuration file on every computer.

Also, discussed in #6
Here is why is not applicable to support that setting/option:

Could we make it to accept json values?
It'd be easier for user than creating files manually and pass cross-platform aware paths.

We considered this for the configuration proposal but decided against it for now because:

  1. We want to provide auto-completion, which requires including the entire schema in package.json.
  2. Compatibility with different Ruff versions is a challenge. Shipping a schema tied to a specific extension version could limit flexibility since we allow users to use a specific Ruff version with ruff.path.

There's an option to allow any value to pass through to Ruff, leaving validation to the executable. However, this might result in a less optimal user experience due to the lack of auto-completion and delayed feedback on settings correctness.

It's currently not possible, but we're open to supporting it if there are good solutions specifically around user experience. I'll merge this with #6.