We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 459b868 commit ce353a9Copy full SHA for ce353a9
1 file changed
init.lua
@@ -686,14 +686,15 @@ require('lazy').setup({
686
opts = {
687
notify_on_error = false,
688
format_on_save = function(bufnr)
689
- -- Disable "format_on_save lsp_fallback" for languages that don't
690
- -- have a well standardized coding style. You can add additional
691
- -- languages here or re-enable it for the disabled ones.
692
- local disable_filetypes = { c = true, cpp = true }
693
- if disable_filetypes[vim.bo[bufnr].filetype] then
694
- return nil
695
- else
+ -- You can specify filetypes to autoformat on save here:
+ local enabled_filetypes = {
+ -- lua = true,
+ -- python = true,
+ }
+ if enabled_filetypes[vim.bo[bufnr].filetype] then
696
return { timeout_ms = 500 }
+ else
697
+ return nil
698
end
699
end,
700
default_format_opts = {
0 commit comments