refactor: lua config
This commit is contained in:
@@ -2,23 +2,23 @@ local util = require("conform.util")
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = function()
|
||||
---@class ConformOpts
|
||||
---@type conform.setupOpts
|
||||
local opts = {
|
||||
-- LazyVim will use these options when formatting with the conform.nvim formatter
|
||||
format = {
|
||||
default_format_opts = {
|
||||
timeout_ms = 3000,
|
||||
async = false, -- not recommended to change
|
||||
quiet = false, -- not recommended to change
|
||||
lsp_format = "fallback", -- not recommended to change
|
||||
},
|
||||
---@type table<string, conform.FormatterUnit[]>
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
fish = { "fish_indent" },
|
||||
sh = { "shfmt" },
|
||||
php = { "pint" },
|
||||
blade = { "blade-formatter", "rustywind" },
|
||||
-- python = { "black" },
|
||||
python = { "black" },
|
||||
javascript = { "prettierd" },
|
||||
-- rust = { "rustfmt" },
|
||||
},
|
||||
-- LazyVim will merge the options you set here with builtin formatters.
|
||||
-- You can also define any custom formatters here.
|
||||
|
||||
Reference in New Issue
Block a user