-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformatters.lua
More file actions
27 lines (26 loc) · 855 Bytes
/
Copy pathformatters.lua
File metadata and controls
27 lines (26 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
lib.create_autocmd(
{ "BufReadPost", "BufNewFile" },
vim.api.nvim_create_augroup("pea_plugin", { clear = false }),
{ once = true },
function()
vim.pack.add { "https://github.com/stevearc/conform.nvim" }
require("conform").setup {
formatters_by_ft = {
json = { "prettier" },
jsonc = { "prettier" },
markdown = { "prettier" },
javascript = { "prettier" },
typescript = { "prettier" },
svelte = { "prettier" },
css = { "prettier" },
cpp = { "clang-format" },
toml = { "taplo" },
sh = { "shfmt" },
},
format_on_save = {
timeout_ms = 500,
lsp_format = "fallback",
},
}
end
)