-
Notifications
You must be signed in to change notification settings - Fork 24
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
Prettier PR for VSCoder users? #58
Comments
One more thought, an example of a test-case in the README that shows a before & after example, For example, in my case, I did: And if I now run:
with the input: sample.html
I get the following on Stdout:
Which seems wrong, (it is unindented to start) but I am so unfamiliar with npm/npx, I don't know the issue. |
I just found this: prettier/prettier#6034 |
Okay, I guess my test cases are failing because the {{foo}} inside the <script> block causes the formatter to abort formatting. |
<script> & <style> support is currently not there. Regarding VSCode, I could consider publishing the plugin as an additional VSCode extension. |
@NiklasPor I don't think I'm using this enough to justify me asking you to do that, but maybe if other people come along and want it to it makes sense. |
Please, do! I.e. Grafana Unified Alerting Templates are currently using Golang Template language, and it would be really useful. Currently, no golang-template formatter available for VS Code in Marketplace. |
If anyone is still interested in using it globally (without installing it to each repository), you'll need to:
I'm still considering publishing a VSCode extension for the users who're not interested in the node cosmos at all. Especially as the setup above is more than just a click 😁 |
@cameronelliott there are now examples in the |
Never used node.js before, and had it all installed just for this pretty software piece of yours. It was interesting, but having the prettier plugin go template live next to the other vscode extensions would be smoother for sure Cheers ! |
Agree with this 100% -- Love the plugin, but would love it even more without having to install node. Great work regardless! |
When I attempt this, I get:
I have tried this with Quick edit: It would appear that the first part of this issue can be addressed by doing this:
However, the following issue now occurs:
Despite this also having been installed via One last edit: I have now installed both prettier and the go template plugin directly in my project folder, to see if I could get it working like that. Now, however, I am getting this error:
I am not entirely sure what that means unfortunately. |
Same error as user above. |
I can confirm the above mentioned error is still present on the following: Environment:
It seems to be something related to the way the GoTemplate AST is being generated or interpreted by Prettier. Maybe an API change? @NiklasPor any hopes on feedback on this, or is the project no longer maintained? Thanks |
I'm also having this problem |
Same issue here. |
@emilchr @kristofk01 @D-4-N @pinkpigeonltd |
I'm having the same problem as above.: Error resolve node module 'prettier-plugin-go-template' It seems prettier always looks for node_modules in the root folder of the project |
I had the same problem (
|
@NiklasPor is it at all possible to get a position in the file that causes this problem? Because I'm having a hard time finding the offending mistake. |
This seems like a fantastic project, thanks for implementing it.
I am more of a backend Go developer, and try to stay away from NPM/Yarn, Rollup, etc, etc
It would be really wonderful if this was part of Prettier, and
so every VSCode user could this plugin without having to touch NPM.
Just by using a standard VScode extension:
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
(NPM is great, until you do something wrong, and you don't know how to fix it)
Maybe it is not meant to be due to do logistical reasons, but I wanted to throw it out there,
in case.
The text was updated successfully, but these errors were encountered: