summaryrefslogtreecommitdiff
path: root/lsp/clangd.lua
blob: c2deb96f184f6901a8ee624966016720ba70ff0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 }
    },
  }
}