File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -806,7 +806,7 @@ require('lazy').setup({
806806 {
807807 ' <leader>f' ,
808808 function ()
809- require (' conform' ).format { async = true , lsp_fallback = true }
809+ require (' conform' ).format { async = true , lsp_format = ' fallback ' }
810810 end ,
811811 mode = { ' n' , ' v' },
812812 desc = ' [F]ormat file or range (in visual mode)' ,
@@ -819,12 +819,17 @@ require('lazy').setup({
819819 -- -- have a well standardized coding style. You can add additional
820820 -- -- languages here or re-enable it for the disabled ones.
821821 -- local disable_filetypes = { c = true, cpp = true }
822+ -- local lsp_format_opt
823+ -- if disable_filetypes[vim.bo[bufnr].filetype] then
824+ -- lsp_format_opt = 'never'
825+ -- else
826+ -- lsp_format_opt = 'fallback'
827+ -- end
822828 -- return {
823- -- timeout_ms = 1000 ,
824- -- lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype] ,
829+ -- timeout_ms = 500 ,
830+ -- lsp_format = lsp_format_opt ,
825831 -- }
826832 -- end,
827- format_on_save = false ,
828833 formatters_by_ft = {
829834 -- You can use 'stop_after_first' to run the first available formatter from the list
830835 -- javascript = { "prettierd", "prettier", stop_after_first = true },
You can’t perform that action at this time.
0 commit comments