From 82f349b990bfb8fec6cfa89886bcb97dec640f4c Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Wed, 3 Jan 2024 00:08:38 +0300 Subject: added LSP shortcuts --- .config/nvim/lua/user/lsp/cxx.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.config/nvim/lua/user/lsp/cxx.lua') 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, + }, +} -- cgit v1.2.3-70-g09d2