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