franneck94 / Vscode-C-Cpp-Runner

🚀 Compile, run and debug single or multiple C/C++ files with ease. 🚀
MIT License
53 stars 14 forks source link

[ENH] Use `c_Cpp.default.includePath` instead of `c_cpp_runner.include_paths? #29

Closed erwin closed 2 years ago

erwin commented 3 years ago

After I installed the C/C++ Runner extension, I was surprised to see that many of my include paths were no longer found.

I had set the include paths that I want in my default ~/.config/Code/User/settings.json under C_Cpp.default.includePath.

If the value hasn't been explicitly set in C_Cpp Runner, perhaps you can read the C_Cpp.default.includePath as a fallback for people that don't want to duplicate the same list of paths in two places?

franneck94 commented 3 years ago

I'm not sure if many other users also have such a workflow where the include path is set globally and not always workspace (project) specific.

If more users need this feature I can add it, otherwise I would put it on hold for now.

franneck94 commented 2 years ago

Hi, as a note. The current state of the extension at least reads in the includePath from the local .vscode/c_cpp_properties.json file whenever you open an C/C++ project where you havn't initialized this extension yet.