summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/user/lsp/cxx.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/user/lsp/cxx.lua')
-rw-r--r--.config/nvim/lua/user/lsp/cxx.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/.config/nvim/lua/user/lsp/cxx.lua b/.config/nvim/lua/user/lsp/cxx.lua
index 5cd4a2e..afc98b4 100644
--- a/.config/nvim/lua/user/lsp/cxx.lua
+++ b/.config/nvim/lua/user/lsp/cxx.lua
@@ -1 +1,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,
+ },
+}