From 5219cad564152337d5d48572466ac976f300a557 Mon Sep 17 00:00:00 2001 From: Markis Taylor Date: Sun, 8 Oct 2023 16:34:06 -0400 Subject: [PATCH] feat(black): added an extra for black with none-ls & conform.nvim (#1245) * feat(black): added an extra for black with null-ls * fix: update to none-ls/conform --- .../plugins/extras/formatting/black.lua | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/formatting/black.lua diff --git a/lua/lazyvim/plugins/extras/formatting/black.lua b/lua/lazyvim/plugins/extras/formatting/black.lua new file mode 100644 index 00000000..d153be53 --- /dev/null +++ b/lua/lazyvim/plugins/extras/formatting/black.lua @@ -0,0 +1,25 @@ +return { + { + "williamboman/mason.nvim", + opts = function(_, opts) + table.insert(opts.ensure_installed, "black") + end, + }, + { + "nvimtools/none-ls.nvim", + optional = true, + opts = function(_, opts) + local nls = require("null-ls") + table.insert(opts.sources, nls.builtins.formatting.black) + end, + }, + { + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + ["python"] = { { "blackd", "black" } }, + }, + }, + }, +}