We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7aacf4d commit edfb294Copy full SHA for edfb294
1 file changed
init.lua
@@ -701,14 +701,15 @@ require('lazy').setup({
701
opts = {
702
notify_on_error = false,
703
format_on_save = function(bufnr)
704
- -- Disable "format_on_save lsp_fallback" for languages that don't
705
- -- have a well standardized coding style. You can add additional
706
- -- languages here or re-enable it for the disabled ones.
707
- local disable_filetypes = { c = true, cpp = true }
708
- if disable_filetypes[vim.bo[bufnr].filetype] then
709
- return nil
710
- 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
711
return { timeout_ms = 500 }
+ else
712
+ return nil
713
end
714
end,
715
default_format_opts = {
0 commit comments