-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
'Format Selection' and 'Format Document' not language aware #70995
Comments
See #41882 (comment) for some background. What this means is that you have three extensions installed that all advertise that they can configure the current document (not which which that is). The prompt is shown the make clear what happens and to make you chose or disable/uninstall conflicting formatters. |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
fyi - I have pushed a change so that format document still picks some formatter (it now prints a status bar message which it picked). closing quick pick is a separate command which doesn't take the keybinding away anymore |
@jrieken Thank you very much for the update. The update helps with ease of use, but, it picked the wrong formatter for the project. The reason I have multiple formatters is because different projects are using different formatters. I would love to be able to set the "defaultFormatter" in the workspace settings so that each workspace can use the correct formatter. I hope you will consider that one because I think that people will request it in the future. In the workspace it could be like
|
@jrieken There was no solution working because we are forced to enable and disable extensions every time we switch projects, it's an ongoing problem / not resolved |
@Yzrsah How about defining the setting on the workspace-level, e.g in the |
@jrieken I'm sorry I didn't respond sooner That would be fantastic! And would be very useful for working with different projects. Thanks so much for your consideration about it. |
@jrieken I just got a surprise to discover The popup prompted me to select a default formatter and it worked excellently! Thank you so much, this really helps a lot with the projects |
Format Selection
editor.action.formatSelection
and Format Documenteditor.action.formatDocument
do not utilize the language mode for the file.If I'm working with JavaScript and I try to use these commands, I will be prompted to choose from a menu every time:
Having to select the same redundant selection from a menu every time makes this one too unusable.
There does not seem to be a way to set the "Default Formatter" for a language
The text was updated successfully, but these errors were encountered: