add python formatters
This commit is contained in:
parent
71d887f38b
commit
3baaf19bf8
1 changed files with 3 additions and 2 deletions
|
|
@ -568,7 +568,7 @@ require("lazy").setup({
|
||||||
local servers = {
|
local servers = {
|
||||||
clangd = {},
|
clangd = {},
|
||||||
gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
html = { filetypes = { "html", "twig", "hbs" } },
|
html = { filetypes = { "html", "twig", "hbs" } },
|
||||||
templ = { filetypes = { "templ" } },
|
templ = { filetypes = { "templ" } },
|
||||||
|
|
@ -624,6 +624,7 @@ require("lazy").setup({
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
"stylua", -- Used to format lua code
|
"stylua", -- Used to format lua code
|
||||||
|
"black", -- Used to format python code
|
||||||
})
|
})
|
||||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||||
|
|
||||||
|
|
@ -658,7 +659,7 @@ require("lazy").setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
python = { "black" },
|
||||||
--
|
--
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue