You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Disable "format_on_save lsp_fallback" for languages that don't
685
-
-- have a well standardized coding style. You can add additional
686
-
-- languages here or re-enable it for the disabled ones.
687
-
localdisable_filetypes= { c=true, cpp=true }
688
-
ifdisable_filetypes[vim.bo[bufnr].filetype] then
689
-
returnnil
689
+
-- You can specify filetypes to autoformat on save here:
690
+
localenabled_filetypes= {
691
+
-- lua = true,
692
+
-- python = true,
693
+
}
694
+
ifenabled_filetypes[vim.bo[bufnr].filetype] then
695
+
return { timeout_ms=500 }
690
696
else
691
-
return {
692
-
timeout_ms=500,
693
-
lsp_format='fallback',
694
-
}
697
+
returnnil
695
698
end
696
699
end,
700
+
default_format_opts= {
701
+
lsp_format='fallback', -- Use external formatters if configured below, otherwise use LSP formatting. Set to `false` to disable LSP formatting entirely.
702
+
},
703
+
-- You can also specify external formatters in here.
697
704
formatters_by_ft= {
698
-
lua= { 'stylua' },
705
+
-- rust = { 'rustfmt' },
699
706
-- Conform can also run multiple formatters sequentially
0 commit comments