-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat: add more sophisticated formatter selection #275
base: main
Are you sure you want to change the base?
Conversation
9660035
to
a698a77
Compare
Instead of null, can we use "auto"?
This behavior doesn't make much sense to me. If the user requests
Let me know your thoughts! |
Yes that is also a good idea 👍🏼
Ok, So I'll change it, to just do that on the
|
Thanks for your contributions to the extension. I'll try and a get a release out after this PR merges. |
- allow the formatting provider to be set as auto, this means, select the best available one - add internal priority for formatting providers
a698a77
to
3b762c8
Compare
I implemented the suggested changes 😄 |
auto
, this means, select the best available oneThis adds an algorithm, that searches for the best available formatter. This results in the following behavior:
if
formatting.provider
is set toauto
we try to find a formatter in the following order["meson", "muon"
], if one of them is found in this order, that one is usedif
formatting.provider
is set to a specific formatter, it only tries that one and fails, if it didn't find that onefixes #274
Let me know, me if this solution is acceptable. The problem with the previous code is, that it wasn't really designed to handle multiple formatting providers that well.