diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-12 11:08:03 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-12 11:10:33 -0400 |
| commit | 3045b102850a5099c6bed5f821b010e0e9fbad95 (patch) | |
| tree | 38c1fa7c6c93c9b607856949d2fda4cb13f321a3 | |
| parent | Add tiger to ftdetect (diff) | |
| download | dotfiles-3045b102850a5099c6bed5f821b010e0e9fbad95.zip | |
Add xmlformatter to nvim conform
| -rw-r--r-- | nvim/.config/nvim/lua/eugenetriguba/plugins/conform.lua | 13 | ||||
| -rw-r--r-- | nvim/.config/nvim/requirements.txt | 7 |
2 files changed, 18 insertions, 2 deletions
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 |