From d03d96a9fb83c53fc099d500abd3034530b27491 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 18 Aug 2022 22:38:35 +0200 Subject: [PATCH] nvim: add clangd specific lsp plugin --- .config/nvim/lua/my/lsp.lua | 18 ++++++++++++++++++ .config/nvim/lua/my/plugins.lua | 1 + 2 files changed, 19 insertions(+) diff --git a/.config/nvim/lua/my/lsp.lua b/.config/nvim/lua/my/lsp.lua index c11333d..d7dab02 100644 --- a/.config/nvim/lua/my/lsp.lua +++ b/.config/nvim/lua/my/lsp.lua @@ -97,6 +97,24 @@ if vim.fn.executable('clangd') > 0 then } end +require("clangd_extensions").setup({ + server = { + cmd = { + 'clangd', + '--compile-commands-dir=build', + '--clang-tidy', -- needs >=clangd-9 + '--ranking-model=decision_forest' -- needs >=clangd-12 + }, + on_attach = on_attach, + capabilities = capabilities + }, + extensions = { + inlay_hints = { + show_parameter_hints = false + } + } +}) + if vim.fn.executable('lua-language-server') > 0 then lspconfig.sumneko_lua.setup({ settings = { diff --git a/.config/nvim/lua/my/plugins.lua b/.config/nvim/lua/my/plugins.lua index 6b06f33..35120ab 100644 --- a/.config/nvim/lua/my/plugins.lua +++ b/.config/nvim/lua/my/plugins.lua @@ -64,6 +64,7 @@ require('packer').startup(function(use) tag = '*' } use { 'https://github.com/ray-x/lsp_signature.nvim' } + use { 'https://github.com/p00f/clangd_extensions.nvim' } -- tools use {