This commit is contained in:
Belal Elsabbagh
2025-11-19 14:01:26 +02:00
parent c4f48f8cf9
commit 89bc2940dd
4 changed files with 38 additions and 7 deletions

View File

@@ -4,19 +4,24 @@ return {
cmd = { 'ConformInfo' },
keys = {
{
'<leader>cf',
-- Customize or remove this keymap to your liking
'<leader>f',
function()
require('conform').format { async = true, lsp_format = 'fallback' }
require('conform').format { async = true }
end,
mode = '',
desc = '[C]ode [F]ormat',
desc = 'Format buffer',
},
},
-- This will provide type hinting with LuaLS
---@module "conform"
---@type conform.setupOpts
opts = {
notify_on_error = true,
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 1000,
lsp_format = 'fallback',
},
formatters_by_ft = {
lua = { 'stylua' },