This commit is contained in:
2025-10-09 21:36:41 -04:00
parent 67d95eb170
commit 1dc709ab35

View File

@@ -34,19 +34,11 @@ vim.keymap.set('n', '<leader>sh', builtin.help_tags)
vim.keymap.set('n', '<leader>sm', builtin.man_pages)
vim.lsp.config.clangd = {
filetypes = { "c", "cpp", "h", "hpp" },
init_options = {
compilationDatabasePath = ".",
},
on_attach = function(client, bufnr)
if vim.bo.filetype == "c" and vim.fn.expand("%:e") == "h" then
client.config.flags = client.config.flags or {}
client.config.flags.allow_incremental_sync = true
end
end,
cmd = { 'clangd' },
filetypes = { 'c', 'h', 'cc', 'cpp', 'hpp' },
root_markers = { '.git', 'Makefile', '.' },
}
vim.lsp.enable { "clangd" }
vim.diagnostic.config { virtual_text = true, underline = true, signs = false }