Closed csholmq closed 9 years ago
Yes that sounds great. I will implement this asap.
Just added project-specific settings. I look forward to hearing what you think!
Nice one. Got it working once I realised I needed to do Window: reload first. Works great when switching projects using project-manager as the project is reloaded and thus the .json as well.
Only one negative feedback; Only works with absolute paths. Relative paths seem to originate from current file and not project root.
Correction. The .json is only reloaded at Window: reload, or refreshing the window. But project-manager keeps track of each project so it's not a real issue.
This is a caching issue. I've just pushed a commit that deletes the cache each time. So the json file should be reloaded every time you add/remove a project. Could you give it a try?
Ok I have an idea. I can reload the json file every time the current file is saved. What do you think?
Ok the json file is reloaded every time you save a C/C++ file, and relative paths are now expanded.
Sounds great. However, I can't seem to get relative paths to work.
Can you show me your .gcc-flags.json file please? It's working at my end.
{ "execPath": "./Sw/P_Xmc/tools/ARM-GCC/bin/arm-none-eabi-gcc", "gccDefaultCFlags": "-Wall", "gccDefaultCppFlags": "-Wall -std=c++11", "gccErrorLimit": 5, "gccIncludePaths": "./Sw/A_XMC/out/obj", "gccSuppressWarnings": true }
Yes I see the problem. I didn't add the relative path expansion to execPath
as well. Let me do that quickly.
Done! Give it a try! :)
Works great! Thanks a bunch!
linter-clang now supports .clangcomplete files which allows you to inject e.g. -I/path/to/include/dir_ for each project. As each of my projects at work comes bundled with both include dirs and gcc environment I would love something like this.
I.e. support for project specific settings like exec path and include dirs.