Our great sponsors
-
YCM-Generator
Discontinued Generates config files for YouCompleteMe (https://github.com/Valloric/YouCompleteMe)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Back in the days when I used YouCompleteMe there was a plugin called YCM-Generator that could use the output of certain make calls to build the information necessary for YouCompleteMe. Unfortunately, the YCM configuration is different from the configuration clangd wants.
Right now the standard plugin for autocompletion is https://github.com/hrsh7th/nvim-cmp
I'd say just try to copy that code from nvim-cmp readme as is (unless you're using a different package manager ofc) and see if it works for you. If you decide that you've spent too much time on it, you could give https://github.com/neoclide/coc.nvim a try instead. It has vim support as well, and as far as I know it comes with a lot of stuff included.
But it sounds like maybe you’re assuming for the purposes of using something like clangd (highly recommended for coding in cpp projects in general, you want to be using this in vscode or whatever else anyway, codelion notwithstanding I suppose) with neovim on a c++ project that you have to use cmake to produce a compilation database to use with neovim plugins (e.g. clangd via nvim-lsp et. al.). In this case, be aware that the https://github.com/rizsotto/Bear tool is a handy way to just tack it on to whatever command you’re using to run a c++ code build step, and it will give you a compile_commands.json, corresponding to the compiler commands it invoked, on a silver platter.