We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f74ae10 commit a74c09fCopy full SHA for a74c09f
lua/custom/plugins/init.lua
@@ -53,7 +53,18 @@ conform.formatters_by_ft = {
53
javascript = { 'prettierd ' },
54
typescript = { 'prettierd ' },
55
ruby = { 'rubocop' },
56
+ markdown = { 'markdownlint' },
57
}
58
+conform.format_on_save = function(bufnr)
59
+ -- Disable "format_on_save lsp_fallback" for languages that don't
60
+ -- have a well standardized coding style. You can add additional
61
+ -- languages here or re-enable it for the disabled ones.
62
+ local disable_filetypes = { c = true, cpp = true }
63
+ return {
64
+ timeout_ms = 5000,
65
+ lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
66
+ }
67
+end
68
69
return {
70
{
0 commit comments