Is CMake necessary to set up a C++ "IDE" in neovim?

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • YCM-Generator

    Discontinued Generates config files for YouCompleteMe (https://github.com/Valloric/YouCompleteMe)

  • 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.

  • nvim-cmp

    A completion plugin for neovim coded in Lua.

  • Right now the standard plugin for autocompletion is https://github.com/hrsh7th/nvim-cmp

  • 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.

    SurveyJS logo
  • coc.nvim

    Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.

  • 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.

  • Bear

    Bear is a tool that generates a compilation database for clang tooling.

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts