From 55d9e056dc2cca31dbbce40613d4ab0b160d9b9c Mon Sep 17 00:00:00 2001 From: Tine Date: Thu, 29 Feb 2024 12:16:12 +0100 Subject: [PATCH] feat(nvim): more formatters --- nvim/lua/code_helpers.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nvim/lua/code_helpers.lua b/nvim/lua/code_helpers.lua index aa7ccef..32e78d9 100644 --- a/nvim/lua/code_helpers.lua +++ b/nvim/lua/code_helpers.lua @@ -188,6 +188,20 @@ require("formatter").setup({ graphql = { require("formatter.filetypes.graphql").prettier, }, + html = { + require("formatter.filetypes.html").prettier, + }, + template = { + function() + local prettierForGoTemplate = require("formatter.defaults.prettier")() + table.insert(prettierForGoTemplate.args, "--plugin") + table.insert(prettierForGoTemplate.args, "prettier-plugin-go-template") + return prettierForGoTemplate + end, + }, + css = { + require("formatter.filetypes.css").prettier, + }, rust = { require("formatter.filetypes.rust").rustfmt, },