-
Notifications
You must be signed in to change notification settings - Fork 43
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
VS Code extension #129
Comments
Hi @bluebrown very cool! Thank you for making this, I will add it to the README soon. I think it would be great if there was a way to have it look in the project directory for a Also, would being able to load JSON for a Thank you very much for making this, and I will mention it in the README soon! |
Hi, thanks for the feedback. I made it so that it runs with the workspace folder as current workdir for Additionally, the file can be put in the usual places like And I have it so that you can pass extra args to binary, so it's possible to use Regarding embedding the config in the settings.json. I have thought about it but decided against it. I guess the rationale is similar to something like ESLint, which also uses an external config file. It's because that allows to still run it standalone. And not everyone is using VS Code. So if you want to support your teammates workflows, it's probably better to use an editor agnostic way of configuring it. |
You can see the different ways of configuring it here in the testdata folder https://github.com/bluebrown/vscode-extension-yamlfmt/tree/main/test/suite/testdata |
Yes, that could be done as well, but one would need to decide what takes precedence when both exist. It would also help if it could read the config from stdin because that way we can grab it from settings.json and pass it directly to the binary instead of having to write it to some temp location. Another issue is, that VS Code allows to simply open a file. Then, it doesn't belong to a workspace, so it is ambiguous what the current workdir should be. Currently, I am falling back to setting the parent dir of the file as |
Hi, I created a VS Code extension wrapping
yamlfmt
: https://marketplace.visualstudio.com/items?itemName=bluebrown.yamlfmt. Maybe you could mention it in your README.If you have ideas for adjusting this to your liking, I am open for it.
The text was updated successfully, but these errors were encountered: