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

ruff server should check find_user_settings_toml() if no file configuration exists #11158

Closed
snowsignal opened this issue Apr 26, 2024 · 2 comments · Fixed by #11225
Closed
Assignees
Labels
configuration Related to settings and configuration server Related to the LSP server

Comments

@snowsignal
Copy link
Member

When a workspace folder doesn't have any configuration available, ruff server should try find_user_settings_toml() as a fallback. This would try reading ~/.config/ruff/.ruff.toml, ~/.config/ruff/ruff.toml and ~/.config/ruff/pyproject.toml on Linux.

@snowsignal snowsignal added configuration Related to settings and configuration server Related to the LSP server labels Apr 26, 2024
@snowsignal snowsignal self-assigned this Apr 26, 2024
@GaetanLepage
Copy link

Has this been fixed within #11140 or it it needs another PR ?

@snowsignal
Copy link
Member Author

It needs another PR, which should be open soon!

snowsignal added a commit that referenced this issue May 1, 2024
…uration directory if no local configuration exists (#11225)

## Summary

Fixes #11158.

A settings file in the ruff user configuration directory will be used as
a configuration fallback, if it exists.

## Test Plan

Create a `pyproject.toml` or `ruff.toml` configuration file in the ruff
user configuration directory.

* On Linux, that will be `$XDG_CONFIG_HOME/ruff/` or `$HOME/.config`
* On macOS, that will be `$HOME/Library/Application Support`
* On Windows, that will be `{FOLDERID_LocalAppData}`

Then, open a file inside of a workspace with no configuration. The
settings in the user configuration file should be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration server Related to the LSP server
Projects
None yet
2 participants