Closed ismasou closed 10 months ago
After the new update, my older setup using nvim-lspconfig is not working. I use lazy.nvim and add a lsp to nvim-lspconfig named clangd:
setup = { clangd = function(_, opts) opts.capabilities.documentFormattingProvider = false require("clangd_extensions").setup({ server = { cmd = { "clangd", "--background-index", "--completion-style=detailed", "--header-insertion=iwyu", "--suggest-missing-includes", "--cross-file-rename", "--offset-encoding=utf-16", }, init_options = { clangdFileStatus = true, usePlaceholders = true, completeUnimported = true, semanticHighlighting = true, }, }, extensions = { autoSetHints = true, ast = { --These require codicons (https://github.com/microsoft/vscode-codicons) role_icons = { type = "", declaration = "", expression = "", specifier = "", statement = "", ["template argument"] = "", }, kind_icons = { Compound = "", Recovery = "", TranslationUnit = "", PackExpansion = "", TemplateTypeParm = "", TemplateTemplateParm = "", TemplateParamObject = "", }, }, }, }) vim.keymap.set("n", "gh", "<cmd>ClangdSwitchSourceHeader<CR>", { silent = true, desc = "Switch between header and source" }) return opts end }
Can you please clarify how one should do the setup now?
https://github.com/p00f/clangd_extensions.nvim#configuration
Just use lspconfig or vim.lsp.start like your other servers, instead of the server key in clang-extensions setup
server
After the new update, my older setup using nvim-lspconfig is not working. I use lazy.nvim and add a lsp to nvim-lspconfig named clangd:
Can you please clarify how one should do the setup now?