Autoformatting for django does 4-spaces now thank fucking god

This commit is contained in:
Jimmy Bates 2024-07-03 10:31:34 -07:00
parent 9838812715
commit 62847aca50
2 changed files with 10 additions and 2 deletions

View File

@ -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,
},
},
},
}

View File

@ -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,