My next stop in IDE evaluation was the Sublime Text editor. It showed much promise. But no CMake related integration. That was a short evaluation.
Jet Brains CLion seems to have all the bases covered. It knows CMake and can pull the include directories for building the symbol relationship database.
The drawback is that it is resource intensive. By using some of the Performance Tuning Tips, particularly increasing heap memory and disabling some inspections, things improved. Given enough time, it will still consume all allocated memory and will need to be restarted. The startup and initial scanning indicates a stack overflow, seemingly from a stack recursion issue, so there are some bugs to fix.
So far, given that, this is still the best of the bunch.
If I was on Windows, I'd probably return to Visual Studio. But that isn't available natively on Linux, only some VSCode thingy which is only an editor. Or maybe it has morphed into something more tangible lately. Oddly, it has Debug menu, but no Build menu, and no obvious mention of CMake.
Given some time, I'm thinking of following up on a combination of:
- Vim or NeoVim
- You Complete Me - a code-completion engine for Vim
- cquery - C/C++ language server supporting multi-million line code base, powered by libclang - cross references, completion, diagnostics, semantic highlighting and more
- NERDTree for viewing the file system in a tree view
- Tagbar for viewing the functions and classes in a tree view for the curent file.
- ctrlp.vim for fuzzy file search
- vim-cpp-enhanced-highlight highlights things commonly found in C++ programs such as STL functions and classes
- ag.vim for fuzzy content search, I usually still prefer using ag from the commandline though
- vim-fugutive for common git operations such as blaming and logging
- ultisnips for commonly used boilerplate
- Vim bindings for rtags - client/server indexer for c/c++ (not ctags, which doesn't use a compiler back end)
From reddit:
Spacemacs/SpaceVim with ycmd for auto completion and error checking, with rtags (or perhaps, soon, cquery) for indexing. All libclang based, all highly performant and responsive. Outside of C++ specific stuff, it has the best vim emulation, the best buffer/window/workspace management, the best git extension, and the best textual search/manipulation (powered by things like helm and helm-ag) of any editor I've used.
I've recently come to enjoy gdb + tmux + voltron for debugging with this workflow as well.
2019/11/26 - ccls - C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting - appears to be the successor to cquery.
2019/11/26 - reddit comments suggest to watch for clangd, which implements the Language Server Protocol, which is used to add smart features to your editor: code completion, compile errors, go-to-definition and more. getting started with clangd indicates it works with YouCompleteMe for VIM, Visual Studio Code, CMake-based projects, and others. clangd in clion shows how to enable clangd in CLion. A tutorial Using LSP & clangd in Vim.