-
Notifications
You must be signed in to change notification settings - Fork 46
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 specifying default options through server settings #67
Comments
Your description is correct. The thing holding me back is that I'm not sure how best to enable this without further complicating Ruff's settings detection. I guess we could save any defaults to a TOML file locally, and then point Ruff to it (e.g., |
Sound a bit hacky to generate a random file like that. I guess just supporting |
Does this mean |
Related - it seems that the new [tool.ruff]
line-length = 120 When used on the command line, but there doesn't appear to be any way to pass line-length specifically as format args via the LS. If a config file on disk does not exist, but |
No, it wouldn't respect the line length from |
I think that would be extremely useful (and mirror how |
I think we shouldn't promote the use of |
That's fantastic to hear - my request would then be a way to adjust the linter & formatter behavior via the LS settings. |
(Note that I haven't yet played with overriding settings so things I write below might be inaccurate. I did look through documentation though.)
I think it would make sense to be able to tell the server to use certain defaults (like line width 120) but still allow the project-specific overrides win. I believe that if one now specifies default line width through
initializationOptions.settings.args
then that will win over any other settings.I saw in the documentation that it's possible to specify default settings in a file within home directory and that's fine but I would still prefer to specify defaults through LSP settings instead to keep everything contained within the server configuration.
I wonder what do you think about this.
The text was updated successfully, but these errors were encountered: