From f07fb6cced175463424b0d85406b2babb28d1617 Mon Sep 17 00:00:00 2001 From: Oluwatobi Date: Tue, 30 Apr 2024 10:19:08 +0100 Subject: [PATCH] added xml formatter --- after/plugin/conform-config.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/after/plugin/conform-config.lua b/after/plugin/conform-config.lua index feaef3ee..59bb7baa 100644 --- a/after/plugin/conform-config.lua +++ b/after/plugin/conform-config.lua @@ -8,11 +8,23 @@ require('conform').setup { javascriptreact = { { 'prettier' } }, typescriptreact = { { 'prettier' } }, typescript = { { 'prettier' } }, + xml = { 'prettier', 'xmlformat' }, html = { { 'prettier' } }, go = { { 'gofumpt', 'goimports-reviser', 'golines' } }, java = { 'google-java-format' }, templ = { 'templ' }, }, + format_on_save = { + -- I recommend these options. See :help conform.format for details. + lsp_fallback = true, + timeout_ms = 500, + }, + -- If this is set, Conform will run the formatter asynchronously after save. + -- It will pass the table to conform.format(). + -- This can also be a function that returns the table. + format_after_save = { + lsp_fallback = true, + }, } vim.api.nvim_create_autocmd('BufWritePre', {