refactor: lua config

This commit is contained in:
2024-11-15 13:47:58 +03:00
parent 35f4ff4fd2
commit 84f952b665
5 changed files with 76 additions and 129 deletions

View File

@@ -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.