local util = require("lspconfig.util")
|
|
|
|
return {
|
|
cmd = {
|
|
"clangd",
|
|
"--compile-commands-dir=.",
|
|
"--header-insertion=never",
|
|
"--cross-file-rename",
|
|
"--clang-tidy",
|
|
"--completion-style=detailed",
|
|
"--function-arg-placeholders",
|
|
"--fallback-style=llvm",
|
|
},
|
|
filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
|
|
root_dir = util.root_pattern(
|
|
'.clangd',
|
|
'.clang-tidy',
|
|
'.clang-format',
|
|
'compile_commands.json',
|
|
'compile_flags.txt',
|
|
'configure.in',
|
|
'.git',
|
|
'Makefile'
|
|
),
|
|
single_file_support = true,
|
|
init_options = {
|
|
usePlaceholders = true,
|
|
completeUnimported = true,
|
|
clangdFileStatus = true,
|
|
},
|
|
}
|