djlint and formatting improvements
This commit is contained in:
parent
c05a9c9c4d
commit
c303f4a474
|
@ -410,7 +410,7 @@ M.edit = {
|
||||||
-- format with conform
|
-- format with conform
|
||||||
["<leader>ff"] = {
|
["<leader>ff"] = {
|
||||||
function()
|
function()
|
||||||
require("conform").format()
|
vim.lsp.buf.format()
|
||||||
end,
|
end,
|
||||||
"format buffer",
|
"format buffer",
|
||||||
},
|
},
|
||||||
|
|
|
@ -580,15 +580,12 @@ local plugins = {
|
||||||
local nls = require "null-ls"
|
local nls = require "null-ls"
|
||||||
local builtins = nls.builtins
|
local builtins = nls.builtins
|
||||||
local sources = {
|
local sources = {
|
||||||
builtins.formatting.black,
|
builtins.formatting.djlint.with {
|
||||||
builtins.formatting.fixjson,
|
filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" },
|
||||||
builtins.formatting.golines,
|
},
|
||||||
builtins.formatting.shellharden,
|
builtins.diagnostics.djlint.with {
|
||||||
builtins.formatting.sql_formatter,
|
filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" },
|
||||||
builtins.diagnostics.mypy,
|
},
|
||||||
builtins.diagnostics.vint,
|
|
||||||
builtins.diagnostics.yamllint,
|
|
||||||
builtins.code_actions.shellcheck,
|
|
||||||
builtins.formatting.shfmt,
|
builtins.formatting.shfmt,
|
||||||
builtins.diagnostics.write_good.with {
|
builtins.diagnostics.write_good.with {
|
||||||
diagnostics_postprocess = function(diagnostic)
|
diagnostics_postprocess = function(diagnostic)
|
||||||
|
|
Loading…
Reference in New Issue