You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Disable "format_on_save lsp_fallback" for languages that don't
22
-
-- have a well standardized coding style. You can add additional
23
-
-- languages here or re-enable it for the disabled ones.
24
-
localdisable_filetypes= { c=true, cpp=true }
25
-
ifdisable_filetypes[vim.bo[bufnr].filetype] then
26
-
returnnil
21
+
-- You can specify filetypes to autoformat on save here:
22
+
localenabled_filetypes= {
23
+
-- lua = true,
24
+
-- python = true,
25
+
}
26
+
ifenabled_filetypes[vim.bo[bufnr].filetype] then
27
+
return { timeout_ms=500 }
27
28
else
28
-
return {
29
-
timeout_ms=500,
30
-
lsp_format='fallback',
31
-
}
29
+
returnnil
32
30
end
33
31
end,
32
+
default_format_opts= {
33
+
lsp_format='fallback', -- Use external formatters if configured below, otherwise use LSP formatting. Set to `false` to disable LSP formatting entirely.
34
+
},
35
+
-- You can also specify external formatters in here.
34
36
formatters_by_ft= {
35
-
lua= { 'stylua' },
37
+
-- rust = { 'rustfmt' },
36
38
-- Conform can also run multiple formatters sequentially
0 commit comments