{"id":20367,"library":"prettier-plugin-go-template","title":"Prettier Go Template","description":"Prettier plugin for formatting Go and GoHugo templates. Current stable version 0.0.15, compatible with Prettier ^3.0.0. Requires Node >=14. Automatically formats .gohtml, .gotmpl, .go.tmpl, .tmpl, .tpl, .html.tmpl files. Supports bracket spacing option. For .html files, parser override is needed. No other dependencies beyond Prettier. Actively maintained.","status":"active","version":"0.0.15","language":"javascript","source_language":"en","source_url":"https://github.com/NiklasPor/prettier-plugin-go-template","tags":["javascript","prettier","plugin","go","hugo","gohugo","template","html","typescript"],"install":[{"cmd":"npm install prettier-plugin-go-template","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-plugin-go-template","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-plugin-go-template","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin functionality","package":"prettier","optional":false}],"imports":[],"quickstart":{"code":"npm install --save-dev prettier prettier-plugin-go-template\n# .prettierrc\n{\n  \"plugins\": [\"prettier-plugin-go-template\"],\n  \"goTemplateBracketSpacing\": true\n}","lang":"javascript","description":"Install and configure the plugin in .prettierrc for Prettier 3+."},"warnings":[{"fix":"Add 'plugins': ['prettier-plugin-go-template'] to .prettierrc.","message":"Starting with Prettier 3, auto-discovery has been removed. Configuration is required.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Add parser override in .prettierrc: overrides [{ files: ['*.html'], options: { parser: 'go-template' } }].","message":"For GoHugo .html files, the default HTML parser is used unless overridden. Mixed templates may break.","severity":"gotcha","affected_versions":"all"},{"fix":"Install both prettier and plugin either both globally or both locally.","message":"Global and local installations must match. VSCode may not detect plugin if installed in different scope.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install --save-dev prettier prettier-plugin-go-template","cause":"Plugin not installed or not in same scope as prettier.","error":"Cannot find module 'prettier-plugin-go-template'"},{"fix":"Add 'plugins': ['prettier-plugin-go-template'] to .prettierrc.","cause":"The plugin is not loaded or parser name is incorrect.","error":"Couldn't resolve parser \"go-template\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}