summaryrefslogtreecommitdiff
path: root/lsp/clangd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lsp/clangd.lua')
-rw-r--r--lsp/clangd.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/lsp/clangd.lua b/lsp/clangd.lua
new file mode 100644
index 0000000..c2deb96
--- /dev/null
+++ b/lsp/clangd.lua
@@ -0,0 +1,30 @@
+return {
+ cmd = {
+ "clangd",
+ "--header-insertion=iwyu",
+ "--background-index",
+ "--clang-tidy",
+ "--log=verbose",
+ },
+ filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
+ root_markers = {
+ ".clangd",
+ ".clang-tidy",
+ ".clang-format",
+ "compile_commands.json",
+ "compile_flags.txt",
+ "configure.ac",
+ "Makefile",
+ "CMakeLists.txt",
+ ".git",
+ },
+ single_file_support = true,
+ flags = {
+ debounce_text_changes = 20,
+ },
+ capabilities = {
+ textDocument = {
+ completion = { editsNearCursor = true }
+ },
+ }
+}