mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-02 21:44:37 +02:00
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
This commit is contained in:
parent
de93848f58
commit
5219cad564
1 changed files with 25 additions and 0 deletions
25
lua/lazyvim/plugins/extras/formatting/black.lua
Normal file
25
lua/lazyvim/plugins/extras/formatting/black.lua
Normal file
|
@ -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" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue