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

Support prioritizing discovered TOML settings over editor settings #457

Merged
merged 4 commits into from
May 17, 2024

Conversation

snowsignal
Copy link
Member

@snowsignal snowsignal commented Apr 22, 2024

Summary

Fixes #425 (though only in the pre-release version, since this is a feature for the new LSP server)

This is a follow-up to #456.

A new setting has been introduced, Prioritize File Configuration, which tells the extension to prioritize settings from discovered TOML files over extension settings. Extension settings will still be used when a set field in the extension is not set in the file configuration.

Test Plan

Refer to astral-sh/ruff#11086 for a test plan.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Base automatically changed from jane/top-level-settings to pre-release April 25, 2024 00:51
@snowsignal snowsignal force-pushed the jane/prioritize-file-configuration branch from cc7dd42 to b3345c0 Compare April 25, 2024 01:05
snowsignal added a commit to astral-sh/ruff that referenced this pull request Apr 26, 2024
…er editor configuration (#11086)

## Summary

This is intended to address
astral-sh/ruff-vscode#425, and is a follow-up
to #11062.

A new client setting is now supported by the server,
`prioritizeFileConfiguration`. This is a boolean setting (default:
`false`) that, if set to `true`, will instruct the configuration
resolver to prioritize file configuration (aka discovered TOML files)
over configuration passed in by the editor.

A corresponding extension PR has been opened, which makes this setting
available for VS Code:
astral-sh/ruff-vscode#457.

## Test Plan

To test this with VS Code, you'll need to check out [the VS Code
PR](astral-sh/ruff-vscode#457) that adds this
setting.

The test process is similar to
#11062, but in scenarios where the
editor configuration would take priority over file configuration, file
configuration should take priority.
@snowsignal snowsignal merged commit 32db286 into pre-release May 17, 2024
@snowsignal snowsignal deleted the jane/prioritize-file-configuration branch May 17, 2024 05:18
snowsignal added a commit that referenced this pull request May 17, 2024
)

## Summary

Fixes #425 (though only
in the pre-release version, since this is a feature for the new LSP
server)

This is a follow-up to
#456.

A new setting has been introduced, `Prioritize File Configuration`,
which tells the extension to prioritize settings from discovered TOML
files over extension settings. Extension settings will still be used
when a set field in the extension is not set in the file configuration.

## Test Plan

Refer to astral-sh/ruff#11086 for a test plan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants