add python formatters

This commit is contained in:
Noa Aarts 2024-03-13 13:38:03 +01:00
parent 71d887f38b
commit 3baaf19bf8

View file

@ -568,7 +568,7 @@ require("lazy").setup({
local servers = {
clangd = {},
gopls = {},
-- pyright = {},
pyright = {},
rust_analyzer = {},
html = { filetypes = { "html", "twig", "hbs" } },
templ = { filetypes = { "templ" } },
@ -624,6 +624,7 @@ require("lazy").setup({
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
"stylua", -- Used to format lua code
"black", -- Used to format python code
})
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
@ -658,7 +659,7 @@ require("lazy").setup({
formatters_by_ft = {
lua = { "stylua" },
-- 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
-- is found.