Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Autogenerate c_cpp_properties.json #1183

Conversation

adiazulay
Copy link
Contributor

This pr adds autogeneration for c_cpp_properties.json. This will make intelliSense more reliable.

Special thank to @iFreilicht and @hlovdal for rebasing and getting this PR ready to merge.

This PR replaces #1141

elektronikworkshop and others added 30 commits December 13, 2020 19:56
* More documentation on this project
* Tried to identify most of the tasks
* Added beer money support option
* More investigations and documentation, especially on intrinsic/built-in compiler header include paths
* Added IntelliSense compiler parsing engine code
* First injection of the compiler command parser and IntelliSense auto-configuration. Currently injected into "verify" only.
* Updated branch documentation to reflect the current state of this project
* Moved pre-build command into separate member function to reduce code replication, better maintainablility and readability
* Added pre-build command to "upload using programmer" since it was (probably unintentional) missing there
* Notes regarding settings
* Notes where to run the auto-generation
…ration

* Added a global configuration switch which allows the IntelliSense auto-configuration to be turned off
* Prepared the compiler parser code to be injected into "upload" and "upload using programmer" without overhead
* Updated branch documentation
…figuration flag which can override the global flag
* Fixes the line splitting regex as outlined in microsoft#771
* Removed a redundand condition
* Fixed regression introduced with adaptions to latest version of cocopa
* Made compile command regex match more stringent
* Added more serial monitor ideas from [John Lonergan](microsoft#463 (comment))
* Added some ideas how to implement a better serial monitor
* More unit testing within cocopa.
* Implemented c_cpp_properties merging -> compiler analysis results are merged into existing configuration and will preserve configurations of different name than the vscode-studio default configuration name (currently "Arduino"). This opens up the possibility for users to write their own configurations without having to disable the autogeneration.
* Implemented "write on change" - `c_cpp_properties.json` will only be written if a new configuration has been detected.
Copy link
Member

@fearthecowboy fearthecowboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm feeling pretty good about this.

This PR has done some really good stuff to clean up some quirky looking code. Thanks alot @adiazulay. You've brought you're A game on this one.

@adiazulay
Copy link
Contributor Author

All the credit goes to @elektronikworkshop @iFreilicht @hlovdal and all the other contributors on the branch for all their hard work!

@GregTerrell
Copy link

1st off, this is great! Small recommendation for those who do this but want to do a manual rebuild of c_cpp_properties.json

CHANGE: "IntelliSense auto-configuration disabled."

TO: "IntelliSense auto-configuration disabled. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants