diff --git a/lua/custom/plugins/autoformat.lua b/lua/custom/plugins/autoformat.lua index 4ef4ca5d..e8989393 100644 --- a/lua/custom/plugins/autoformat.lua +++ b/lua/custom/plugins/autoformat.lua @@ -27,13 +27,13 @@ return { formatters_by_ft = { lua = { 'stylua' }, python = { 'autopep8' }, - javascript = { { 'prettierd', 'prettier' } }, + javascript = { 'prettier' }, c = { 'clang-format' }, cpp = { 'clang-format' }, yaml = { 'yamlfmt' }, html = { 'djlint' }, htmldjango = { 'djlint' }, - css = { { 'prettierd', 'prettier' } }, + css = { 'prettier' }, json = { 'deno_fmt' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, @@ -42,5 +42,12 @@ return { -- is found. -- javascript = { { "prettierd", "prettier" } }, }, + formatters = { + djlint = { + args = function() + return { '-', '--reformat', '--profile', 'django', '--indent', 4 } + end, + }, + }, }, } diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index 28ebd255..ee77f4e4 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -12,6 +12,7 @@ return { javascript = { 'eslint' }, css = { 'stylelint' }, html = { 'djlint' }, + htmldjango = { 'djlint' }, } -- To allow other plugins to add linters to require('lint').linters_by_ft,