refactor(plugins): improve plugin configurations and add C/C++ formatting

This commit is contained in:
sankalp committed 2025-10-16 22:46:07 +05:45
1 parent 1b7173fc43
commit f4d7cfbd13
6 files changed
+50 -147

No files matched your search

+5 -1
View File
@@ -27,6 +27,9 @@ return {
},
formatters_by_ft = {
['lua'] = { 'stylua' },
['c'] = { 'clang_format' },
['cpp'] = { 'clang_format' },
['h'] = { 'clang_format' },
['python'] = { 'ruff_fix', 'ruff_format', 'ruff_organize_imports' },
['javascript'] = { 'biome' },
['typescript'] = { 'biome' },
@@ -52,9 +55,10 @@ return {
vim.b.conform_disable = not vim.b.conform_disable
local status = vim.b.conform_disable and 'disabled' or 'enabled'
vim.notify('Autoformat ' .. status, vim.log.levels.INFO)
end)
end, { desc = 'Toggle autoformat' })
require('mason-conform').setup({
ensure_installed = {
'clang_format',
'ruff',
'stylua',
'prettier',