-
Notifications
You must be signed in to change notification settings - Fork 266
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
Remove formatting provider #933
Comments
I am not against the idea. There is a lot of users who are not happy with the prettier based formatter. My concern is the silent crowd who are happy with it. If we can devise a plan that will allow them to replace the function they depend on easily that would be ideal. |
I mostly reported this, because I’ve seen other users complain here as well as in relation to Prettier has an Editor Integration page which lists several editor integrations. Unfortunately there’s no Prettier language server (that I know of). For Monaco editor I would be willing to create a Prettier integration if there’s user demand. It’s also possible for |
I really like using prettier for yaml formatting, but it needs to respect This can be set up with A way to "make everyone happy" would be to break out prettier support as a plugin, so that users can choose which formatting provider That being said, it seems like a decent chunk of work, and I'm currently disabling |
I also like using Prettier, but it’s a generic formatter that supports a bunch of languages. For them YAML is just one of them. Better integrations already exist. I think it’s the responsibility of an editor to allow the user to pick a formatter, not that of a language server. I.e. VS Code supports this using the per language |
This replaces Prettier as the LSP formatting solution with the `yaml` package. The `yaml` package can format YAML just fine, and we already have it as a dependency. Prettier is a big dependency. If people want to use Prettier, other Prettier integrations are probably better suited for them. For example, the YAML language server doesn’t respect Prettier configuration files. This is a proof of concept. I tried to map existing options to the new implementation. A more ideal solution might be to change the formatting options. Refs redhat-developer#933
I replaced Prettier an alternative formatter in #983. I think that caters to the silent crowd who just want to have some formatting options, but probably don’t care about the implementation used. |
+1 to this issue, using |
Is your enhancement related to a problem? Please describe.
yaml-language-server
supports formatting YAML files. Under the hood this delegates the formatting to Pretttier. However, this integration is very limited. It doesn’t support Prettier options or a Prettier configuration file.Additionally, the dependency on Prettier is huge. This isn’t great when
yaml-language-server
is used as part of a web bundle.Describe the solution you would like
Remove the formatting provider entirely. Maybe recommend Prettier and their official VS Code extension instead in the readme.
Describe alternatives you have considered
Keep the formatting provider and close this issue.
Additional context
The text was updated successfully, but these errors were encountered: