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 = {
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue