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

vscode formatter settings are not correctly used in multi root workspaces #13108

Closed
Tracked by #13192
eneufeld opened this issue Nov 27, 2023 · 1 comment · Fixed by #13280
Closed
Tracked by #13192

vscode formatter settings are not correctly used in multi root workspaces #13108

eneufeld opened this issue Nov 27, 2023 · 1 comment · Fixed by #13280
Assignees
Milestone

Comments

@eneufeld
Copy link
Contributor

Bug Description:

Using a multi root workspace where each folder has it's own .vscode folder with a settings.json which defines which formatter to use, is not usable in theia. On the first use of the formatter, Theia asks which formatter to use and stores this data in the workspace file. This does not allow to use different formatters per folder. Furthermore this duplicates information that is already available.

I attached a simple multiroot workspace with a minimal set of dependencies.
As formatter, prettier is used with eslint.

Steps to Reproduce:

  1. Install Prettier - Code formatter (https://open-vsx.org/extension/esbenp/prettier-vscode)
  2. open the attached mutliroot workspace using the workspace file
  3. run yarn in the root of the workspace
  4. restart eslint or restart theia
  5. open client/client1/src/index.ts
  6. run save or format
  7. see selection dropdown popping up
  8. select prettier
  9. see change in multi-root-reproducer.code-workspace

Running the same in vscode does not produce the same change and the correct formatter is used directly.

Additional Information

  • Operating System: Ubuntu 22.04
  • Theia Version: Theia Blueprint 1.43.0 (Beta)
@sgraband
Copy link
Contributor

sgraband commented Jan 9, 2024

I can take a look!

sgraband added a commit to eclipsesource/theia that referenced this issue Jan 17, 2024
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 added a commit to eclipsesource/theia that referenced this issue Jan 17, 2024
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 added a commit to eclipsesource/theia that referenced this issue Jan 25, 2024
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
JonasHelming pushed a commit that referenced this issue Jan 25, 2024
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 #13108 for an example.

Fixes #13108.

Contributed on behalf of STMicroelectronics
@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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants