diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2024-01-03 00:08:38 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2024-01-03 00:08:38 +0300 |
commit | 82f349b990bfb8fec6cfa89886bcb97dec640f4c (patch) | |
tree | 1edc1417545fbb7ee6384ab45b004b1c71158a7b /.config/nvim/lua/user/lsp/cxx.lua | |
parent | 340bd3893f90cefa9d6c2f60364008cf7ca1c53c (diff) |
added LSP shortcuts
Diffstat (limited to '.config/nvim/lua/user/lsp/cxx.lua')
-rw-r--r-- | .config/nvim/lua/user/lsp/cxx.lua | 12 |
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, + }, +} |