Prevent clang from adding headers

This commit is contained in:
Alex Yatskov 2023-11-06 12:16:56 -08:00
parent 3dbf38f875
commit 513d192548
2 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.netrwhist
spell

View File

@ -9,7 +9,10 @@ local capabilities = cmp_nvim_lsp.default_capabilities({snippetSupport = false})
-- nvim-lspconfig
local nvim_lspconfig = require('lspconfig')
if vim.fn.executable('clangd') == 1 then
nvim_lspconfig.clangd.setup({capabilities = capabilities})
nvim_lspconfig.clangd.setup({
capabilities = capabilities,
cmd = {'clangd', '--header-insertion=never'},
})
end
if vim.fn.executable('gopls') == 1 then
nvim_lspconfig.gopls.setup({capabilities = capabilities})