fix(conform): replace formatters_by_ft with new 9.x version
This commit is contained in:
parent
bd999072f8
commit
cec95d7a0c
1 changed files with 31 additions and 29 deletions
|
|
@ -1,32 +1,34 @@
|
||||||
-- Some things are from https://www.josean.com/posts/neovim-linting-and-formatting
|
-- Some things are from https://www.josean.com/posts/neovim-linting-and-formatting
|
||||||
return {
|
return {
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
tag = "stable",
|
tag = "stable",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function()
|
config = function()
|
||||||
local conform = require("conform")
|
local conform = require("conform")
|
||||||
conform.setup({
|
conform.setup({
|
||||||
formatters_by_ft = {
|
-- formatters_by_ft = {
|
||||||
javascript = { "prettier" },
|
formatters = {
|
||||||
typescript = { "prettier" },
|
javascript = { "prettier" },
|
||||||
javascriptreact = { "prettier" },
|
typescript = { "prettier" },
|
||||||
typescriptreact = { "prettier" },
|
javascriptreact = { "prettier" },
|
||||||
svelte = { "prettier" },
|
typescriptreact = { "prettier" },
|
||||||
css = { "prettier" },
|
svelte = { "prettier" },
|
||||||
html = { "prettier" },
|
css = { "prettier" },
|
||||||
json = { "prettier" },
|
html = { "prettier" },
|
||||||
yaml = { "prettier" },
|
json = { "prettier" },
|
||||||
markdown = { "prettier" },
|
yaml = { "prettier" },
|
||||||
graphql = { "prettier" },
|
markdown = { "prettier" },
|
||||||
lua = { "stylua" },
|
graphql = { "prettier" },
|
||||||
python = { "isort", "black" },
|
lua = { "stylua" },
|
||||||
sh = { "shfmt" },
|
python = { "isort", "black" },
|
||||||
},
|
sh = { "shfmt" },
|
||||||
format_on_save = {
|
},
|
||||||
lsp_fallback = true,
|
stop_after_first = false,
|
||||||
async = false,
|
format_on_save = {
|
||||||
timeout_ms = 1000, -- default: 1000
|
lsp_fallback = true,
|
||||||
},
|
async = false,
|
||||||
})
|
timeout_ms = 1000, -- default: 1000
|
||||||
end,
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue