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

Add document URI as context to getDefaultFormatter #13280

Conversation

sgraband
Copy link
Contributor

What it does

This way the default formatter will be resolved correctly in multi-root workspaces.
Beforehand only the workspace settings where taken into account.
Now the behavior is as expected (If the workspace does not provide a formatter we take the value from the folder the file is located), see #13108 for an example.

Fixes #13108.

Contributed on behalf of STMicroelectronics

How to test

See #13108 for an example.

Follow-ups

Review checklist

Reminder for reviewers

Copy link
Contributor

@JonasHelming JonasHelming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JonasHelming
Copy link
Contributor

@eneufeld Could you validate?

This way the default formatter will be resolved correctly in multi-root workspaces.
Beforehand only the workspace settings where taken into account.
Now the behavior is as expected, see eclipse-theia#13108 for an example.

Fixes eclipse-theia#13108.

Contributed on behalf of STMicroelectronics
@sgraband sgraband force-pushed the GH-13108-multi-root-formatting branch from c2c5224 to e462122 Compare January 25, 2024 08:28
@JonasHelming JonasHelming merged commit c15aa75 into eclipse-theia:master Jan 25, 2024
14 checks passed
@jfaltermeier jfaltermeier added this to the 1.46.0 milestone Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

vscode formatter settings are not correctly used in multi root workspaces
4 participants