Editor config for C++ functions

I’m finding myself writing more C++ for user defined functions for a Stan model, but not enough to have internalized how to write the template functions properly, so I’m looking to configure something like YCM in Vim or VS Code to help with this. I have VS Code somewhat happy now with a c_cpp_properties.json like so

    "configurations": [
            "name": "Mac",
            "includePath": [
            "defines": [],
            "compilerPath": "/usr/bin/clang++",
            "cStandard": "c17",
            "cppStandard": "c++14",
            "intelliSenseMode": "macos-clang-arm64"
    "version": 4

The main issue I encounter is that this doesn’t identify link errors which are ever present when the template parts aren’t correct. Does anyone have any tips?

edit just to mention that even if VS Code can be configured with the above, it doesn’t actually show compiler errors (prior to linking) that come up when invoking make.

1 Like