djlint
This commit is contained in:
parent
3004b5f61b
commit
479b600626
|
@ -33,9 +33,23 @@ return {
|
|||
}
|
||||
end,
|
||||
},
|
||||
-- NOTE: If using this config, you need to install prettierd.
|
||||
-- At the time of writing that is done with:
|
||||
-- `sudo npm install -g @fsouza/prettierd`
|
||||
cpp = { require("formatter.filetypes.cpp").clangformat },
|
||||
css = { require("formatter.filetypes.css").prettierd },
|
||||
html = { require("formatter.filetypes.html").prettierd },
|
||||
-- NOTE: If you don't care about django templates,
|
||||
-- you can use one of the formatters provided by default.
|
||||
-- html = { require("formatter.filetypes.html").prettierd },
|
||||
html = {
|
||||
function()
|
||||
return {
|
||||
exe = "djlint",
|
||||
args = { "-" },
|
||||
stdin = 1,
|
||||
}
|
||||
end,
|
||||
},
|
||||
java = { require("formatter.filetypes.java").clangformat() },
|
||||
javascript = { require("formatter.filetypes.javascript").prettierd },
|
||||
json = { require("formatter.filetypes.json").prettierd },
|
||||
|
@ -43,7 +57,15 @@ return {
|
|||
latex = { require("formatter.filetypes.latex").latexindent },
|
||||
markdown = { require("formatter.filetypes.markdown").prettierd },
|
||||
php = { require("formatter.filetypes.php").phpcbf },
|
||||
python = { require("formatter.filetypes.python").autopep8() },
|
||||
python = {
|
||||
function()
|
||||
return {
|
||||
exe = "autopep8",
|
||||
args = { "--aggressive -" },
|
||||
stdin = 1,
|
||||
}
|
||||
end,
|
||||
},
|
||||
sh = { require("formatter.filetypes.sh").shfmt() },
|
||||
sql = { require("formatter.filetypes.sql").pgformat() },
|
||||
toml = { require("formatter.filetypes.toml").taplo() },
|
||||
|
@ -54,7 +76,7 @@ return {
|
|||
-- "formatter.filetypes.any" defines default configurations for any
|
||||
-- filetype
|
||||
require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||
require("formatter.defaults.prettierd")
|
||||
require("formatter.defaults.prettierd"),
|
||||
},
|
||||
}
|
||||
opts.filetype = vim.tbl_extend("keep", opts.filetype or {}, filetypes)
|
||||
|
|
|
@ -200,3 +200,6 @@ pyi
|
|||
bietete
|
||||
desc
|
||||
Scherr
|
||||
mariadb
|
||||
Gawa
|
||||
Django
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue