File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ require('lazy').setup({
689689 {
690690 ' <leader>f' ,
691691 function ()
692- require (' conform' ).format { async = true , lsp_fallback = true }
692+ require (' conform' ).format { async = true , lsp_format = ' fallback ' }
693693 end ,
694694 mode = ' ' ,
695695 desc = ' [F]ormat buffer' ,
@@ -702,9 +702,15 @@ require('lazy').setup({
702702 -- have a well standardized coding style. You can add additional
703703 -- languages here or re-enable it for the disabled ones.
704704 local disable_filetypes = { c = true , cpp = true }
705+ local lsp_format_opt
706+ if disable_filetypes [vim .bo [bufnr ].filetype ] then
707+ lsp_format_opt = ' never'
708+ else
709+ lsp_format_opt = ' fallback'
710+ end
705711 return {
706712 timeout_ms = 500 ,
707- lsp_fallback = not disable_filetypes [ vim . bo [ bufnr ]. filetype ] ,
713+ lsp_format = lsp_format_opt ,
708714 }
709715 end ,
710716 formatters_by_ft = {
You can’t perform that action at this time.
0 commit comments