Anyone fancy creating Go plugin for Prettier?!

I like Prettier formatter, means less thinking about things I don’t really need to think about but it doesn’t work with Golang templates eg {{ if .Params.Image }}

I asked if there’s plans for Golang support on the Gitter channel, I was pointed in the direction of the new plugins:

I’m really more of a designer than a coder, so it’s a bit beyond my powers but thought I would put it out there :slight_smile:

3 Likes

You could run the go fmt ./project command to achieve this whilst you wait for the possibility of a plugin.

1 Like

I use a .prettierrc for my Hugo projects. Please try this:

{
  "printWidth": 80,
  "tabWidth": 2,
  "useTabs": false,
  "semi": false,
  "singleQuote": true,
  "traillingComma": "all",
  "bracketSpacing": false,
  "proseWrap": "always",
  "jsxBracketSameLine": false
}
1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.