add config
This commit is contained in:
29
lua/configs/conform.lua
Normal file
29
lua/configs/conform.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
local conform = require("conform")
|
||||
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
|
||||
javascript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
json = { "prettier" },
|
||||
|
||||
-- Add C++ formatters
|
||||
cpp = { "clang-format" },
|
||||
c = { "clang-format" },
|
||||
python = { "black", "isort" },
|
||||
cs = { "csharpier" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
Reference in New Issue
Block a user