From 3045b102850a5099c6bed5f821b010e0e9fbad95 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 12 Oct 2025 11:08:03 -0400 Subject: Add xmlformatter to nvim conform --- nvim/.config/nvim/lua/eugenetriguba/plugins/conform.lua | 13 +++++++++++-- nvim/.config/nvim/requirements.txt | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 nvim/.config/nvim/requirements.txt (limited to 'nvim') diff --git a/nvim/.config/nvim/lua/eugenetriguba/plugins/conform.lua b/nvim/.config/nvim/lua/eugenetriguba/plugins/conform.lua index 89e5c7b..fcf5c4f 100644 --- a/nvim/.config/nvim/lua/eugenetriguba/plugins/conform.lua +++ b/nvim/.config/nvim/lua/eugenetriguba/plugins/conform.lua @@ -71,6 +71,7 @@ return { python = { 'black', 'isort' }, rust = { 'rustfmt' }, sh = { 'shfmt' }, + xml = { 'xmlformatter' }, yaml = { 'prettierd', 'prettier', stop_after_first = true }, json = { 'prettierd', 'prettier', stop_after_first = true }, javascript = { 'prettierd', 'prettier', stop_after_first = true }, @@ -88,8 +89,16 @@ return { isort = { prepend_args = { '--profile', 'black' }, }, - shfmt = { - args = { '-i', '2' }, + xmlformatter = { + command = function() + local python_path = vim.g.python3_host_prog + if python_path and python_path ~= '' then + local venv_bin = vim.fn.fnamemodify(python_path, ':h') + return venv_bin .. '/xmlformat' + end + return 'xmlformat' + end, + prepend_args = { '--blanks' }, }, }, }, diff --git a/nvim/.config/nvim/requirements.txt b/nvim/.config/nvim/requirements.txt new file mode 100644 index 0000000..a732229 --- /dev/null +++ b/nvim/.config/nvim/requirements.txt @@ -0,0 +1,7 @@ +# pynvim +greenlet==3.2.4 +msgpack==1.1.1 +pynvim==0.6.0 + +# xmlformatter +xmlformatter==0.2.8 -- cgit v1.2.3