Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global indent width setting #11228

Open
ipeglin opened this issue May 1, 2024 · 3 comments
Open

Global indent width setting #11228

ipeglin opened this issue May 1, 2024 · 3 comments
Assignees
Labels
question Asking for support or clarification server Related to the LSP server

Comments

@ipeglin
Copy link

ipeglin commented May 1, 2024

I would very much like to see a global VSCode extension setting for indent width, that omits the need for a ruff.toml or pyproject.toml. I personally prefer a different indent size than 4, and it seems really unnecessary to constantly create a local configuration file for such a small change in the config.

@MichaReiser
Copy link
Member

You can change the formatArgs and lintArgs to include a --config indent-width=2. I'm not sure if the new LSP will have a setting for this that doesn't require a configuration file. CC: @snowsignal

@charliermarsh
Copy link
Member

Yeah this is currently solvable without creating a configuration file, with the following in your settings.json:

{
    "ruff.lint.args": ["--config", "indent-width=2"],
    "ruff.format.args": ["--config", "indent-width=2"],
}

@charliermarsh charliermarsh added the question Asking for support or clarification label May 3, 2024
@snowsignal snowsignal added the server Related to the LSP server label May 3, 2024
@snowsignal snowsignal reopened this May 3, 2024
@snowsignal snowsignal self-assigned this May 3, 2024
@snowsignal
Copy link
Member

snowsignal commented May 3, 2024

Even though the current LSP supports this, our new LSP would require this to be in a configuration file at the moment, and I'd like to have this as an proper editor setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for support or clarification server Related to the LSP server
Projects
None yet
Development

No branches or pull requests

4 participants