This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.config/nvim/lua/lsp/c.lua
David JULIEN 101d37ff52 feat: update lsp config
c: make nvim-cmp capabalities available
lua: ignore some non-standard keywords
2021-10-12 14:01:37 +02:00

21 lines
725 B
Lua

-- Author : swytch
-- Created : Tuesday May 18, 2021 12:08:51 CET
-- License : GPLv3
-- Description : clangd config file for lsp
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
require("lspconfig").clangd.setup {
cmd = { "clangd",
"--background-index",
"--suggest-missing-includes",
"--clang-tidy",
"--header-insertion=iwyu"
},
-- The following example advertise capabilities to `clangd`.
capabilities = capabilities,
}