Setup Atom for C++

Below are several of the plugins I use in Atom when developing in C++. You can use whichever editor you like to follow along, but I'll recommend using my setup because it will be the same on any system that runs the editor.

Build process
  • build
    • build: F9
    • targets: F7
  • build-make
    • used by build
  • build-cmake
    • used by build
    • configure build location as /. This is important!
Auto-completion
Syntax highlighting
Static Checks & Utilities

Workflow

  1. Press F7 to generate the make cache
  2. Press F9 for subsequent builds
  3. Press F7 to run executable (as named in CMakeLists.txt)
  4. Press F7 to clean

Final thoughts

This setup streamlines the process greatly. However, there are three drawbacks to this setup. Every setup is different, and in a bigger, more serious project, I would prefer to have a neat nested folder structure to contain my sources.

  1. I have yet to find a good C++ debugger in Atom
  2. I would prefer to configure cmake to output to a /build directory, like I described in my last post. But at the moment, there is no way to configure linter-clang. This forces me to copy down compile_commands.json from /build to the project root.
  3. There is no way to specify the Makefile location to the build-make plugin. Smells like a pull request to me