debug and problems

This commit is contained in:
Ali Can Zeybek
2026-02-08 12:54:03 +03:00
parent 5d208f102a
commit 412040b46d
12 changed files with 619 additions and 17 deletions

View File

@@ -0,0 +1,34 @@
local conform = require("conform")
conform.setup({
formatters_by_ft = {
c = { "clang_format" },
cpp = { "clang_format" },
h = { "clang_format" },
hpp = { "clang_format" },
},
format_on_save = function(bufnr)
local ft = vim.bo[bufnr].filetype
local cpp_filetypes = {
c = true,
cpp = true,
h = true,
hpp = true,
}
if cpp_filetypes[ft] then
return {
timeout_ms = 1000,
lsp_format = "fallback",
}
end
end,
})
vim.api.nvim_create_user_command("Format", function()
conform.format({
async = false,
timeout_ms = 1000,
lsp_format = "fallback",
})
end, {})