Add formatters for lua and yaml
This commit is contained in:
15
nvim/lua/plugins/conform.lua
Normal file
15
nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- https://github.com/stevearc/conform.nvim
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
yaml = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user