microsoft / microsoft/vscode-makefile-tools
Generate c_cpp_properties.json
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 242
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
Regarding the header, it is by design that we don't see it when standalone but only when included in another c/c++ source file because only then it becomes a translation unit. Any design change regarding how IntelliSense works for standalone headers would belong to CppTools (our sister extension), not Makefile Tools.
Originally posted by @andreeis in https://github.com/microsoft/vscode-makefile-tools/issues/433#issuecomment-1476847968
So, my issue was that make extention didn't extract some configs from the makefile. The way the export works right now is that make extension tries to parse the makefile and extract as much info as possible. Next it would pass that info to the intellisence. But by doing so it overrides the user's configs. And if the extention failes to parse the info it would just supply the default values (and not even default values listed in the global user config, THE default values).
What would be great if there was a toggle right in the extention GUI that would allow users to just copy all configs from the makefile that it managed to parse correctly into a local c_cpp_properties.json config file and just use that. That would allow the user to manually fix something if there's a need for it.
If I understand it right, the source for config profiles is specified in the local settings.json file as "C_Cpp.default.configurationProvider" field. So by default the extension sets this field as "ms-vscode.makefile-tools". Now, if there was this toggle and the user toggled it off, the extension would just need to copy every info it gathered from the makefile and then clear the "C_Cpp.default.configurationProvider" field and vice versa. Seems like a pretty easy solution that would satisfy a lot of users dealing with some weird/not yet implemented behavior of the extension
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing where Makefile Tools parses Makefile configuration and sets C_Cpp.default.configurationProvider; the issue names no source files or tests. Review how workspace settings and c_cpp_properties.json are currently handled. Done should include an opt-in toggle that writes parsed configuration locally and clears or restores the provider setting as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100