1
2
3
4
5
6
7
8
9
10
11
12
13
|
lsp = require 'lspconfig'
lsp.clangd.setup {
cmd = {"clangd", "--background-index", "--suggest-missing-includes", "--clang-tidy"},
filetypes = {"c", "cpp", "cxx", "h", "hpp", "hxx", "inc", "objc", "objcpp"},
root_dir = lsp.util.root_pattern("compile_commands.json", "CMakeLists.txt", "Makefile", "qmake.pro", ".git"),
init_options = {
clangdFileStatus = true,
usePlaceholders = true,
completeUnimported = true,
semanticHighlighting = true,
},
}
|