diff options
Diffstat (limited to 'lua')
-rw-r--r-- | lua/conform/formatters/djlint.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/conform/formatters/djlint.lua b/lua/conform/formatters/djlint.lua index 03922bd..b7a177b 100644 --- a/lua/conform/formatters/djlint.lua +++ b/lua/conform/formatters/djlint.lua @@ -6,10 +6,10 @@ return { description = "✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang.", }, command = "djlint", - args = { - "--reformat", - "-", - }, + args = function(_, ctx) + local indent = vim.bo[ctx.buf].tabstop or 4 -- default is 4 + return { "--reformat", "--indent", indent, "-" } + end, cwd = util.root_file({ ".djlintrc", }), |