user35534: So I started typing out this question, but in the process of taking screenshots and looking up sources for the question I figured out the answer :P
That said, this problem has been a snag for me for a while and I've asked multiple people about it with no solution. Because it seemed kind of daunting for me and I haven't seen many well explained reasons I figured I'd finish out the post here to help anyone that is running into this or will run into it in the future.

The snag
I'm using vscode for my editor and I've had this snag for a while but it's finally driving me nuts enough to ask for help.
When in include certain libraries I get error squiggles under the include.

In this case the squiggle is popping up because of the error:

cannot open source file "WProgram.h" (dependency of "Adafruit_MPR121.h")C/C++(1696)


At first I though the snag was because my include path needed my arduino libraries directory so I added that for the project, but I still get the snag.

I did a computer wide search for the WProgram.h file but was not able to find it.

The thing is, all of my sketches still compile and upload fine so for the most part I'm just able to ignore it ... but the squiggle!!!!!!.
Any ideas of how I can resolve this?

user35534: The answer
Like I said in the question, I found the answer after doing some searching while typing up the question itself and I want to explain it for future squiggle-haters :)
WProgram.h vs Arduino.h
I did a bunch of searching to try to track down what's going on and I eventually found this helpful (and depending on the veracity of the source, kind of sad) bit of history:

There is history of the arduino project not everyone was aware of or supposed to know. I only this much: this all started with some graduate student(s) that created the wiring platform and IDE, called wiring board and wiring "programming language". This project is still active with active users like the arduino project. Then the arduino folks decide to create the arduino project based on wiring project so they took the wiring IDE (which took from the original Processing IDE), including all the libraries etc. and created the first Arduino board (slightly different than wiring board, cheaper!) called it arduino. Arduino project has not very positively acknowledged the wiring project as the source of their project and wiring folks didn't take it very well.
Now, that WProgram.h, is a definition file created by and for the wiring project and board. That's why it has a W on it. It has been in Arduino IDE since its beginning and was replaced by Arduino.h only recently when Arduino 1.0 was released. Now all Arduino 1.0+ IDE will use Arduino.h and not WProgram.h so if you have that plus some other old stuff, you will have to make changes to work with Arduino 1.0+ IDE.

The temp fix
With that in mind I dove into the source file for the Adafruit_MPR121.h library and found where it includes the WProgram.h header file and commented it out.

It's also worth pointing out that the pre-compiler conditional here supports the renaming of the file in newer versions of Arduino.

I labeled this section of the answer as "The temp fix" because it involves modifying a 3rd party dependency which is normally not a great idea. Yeah it fixes it now, but as soon as I need to update this library that edit is going to get blown away and I'd need to manually do it again. In this case the update is pretty minimal so maybe that's no big deal, but if the fix was more involved, like a heavy edit, that would be a real big pain in the butt and could cause other unforeseen consequences (and I played half-life as a kid so I know that's not good).
The better fix
Normally I would say the better fix for this would be to clone the source repository, make the fix there, and do a pull request so the dependency itself gets updated at the source (if someone approves and merges the PR).
But this is a bit different, the conditional in there is actually fine as it adds backwards compatibility. It's there so that the library can support both pre-1.0 and post-1.0 arduino IDE versions. If we did a PR to cut out the WProgram.h reference we'd add in breaking code for anyone on the older versions.
So, the better solution is to appease my local compiler.
We know that the Arduino.h header for all intents and purposes is the same as the WProgram.h, so a almost-full-proof solution would be to fake out the WProgram.h file on my computer to appease the compiler.

An important part to note here is that to make sure I faked it out correctly I went to the arduino repository, scrolled back through the tags, found the last tag before they switched to 1.0+, and found the WProgram.h file. Once there I grabbed the same pre-compiler check and definition for the WProgram header so I could be sure I did the correct define for the WProgram name.

This feels like a bit of overkill because it protects me from other headers being included with the same string defined, but if that happened it would be because I have the WProgram file anyway, but I figured if I was going to fake it out I'd do it right.
This could backfire if I include a library that only includes WProgram.h and not the Arduino.h in that arduino version check conditional, but this would 100% be the case for a correction and pull request for that library.
Summary
So now I know that the Arduino.h file is the reason I'm able to compile everything correctly even with the red squiggle, I have a faked out WProgram.h so that my compiler can find something when looking for the file and, most importantly, I no longer need to look at those red squiggles under the includes :)

Next step, figure out the same thing for Sam.h :P

user78418: I recently figured out, it's way too simple.
Just tap F1 and look for this then select the configuration for "Arduino".

(Pardon my Grammer)

user72298: I landed here in the same position as you, and after researching the comments mentioning -DARDUINO=10813 and some more googling I found: https://github.com/microsoft/vscode-arduino/issues/1148
This led me to adding one more line to defines in my c_cpp_properties.json
and this also removed the squiggly!
{
    "configurations": [
        {

            ...

            "defines": [
                "USBCON",
                "ARDUINO=10813"
            ],

            ...

        }
    ],

}```


35534: <p>So I started typing out this question, but in the process of taking screenshots and looking up sources for the question I figured out the answer :P</p>
<p>That said, this problem has been a snag for me for a while and I've asked multiple people about it with no solution. Because it seemed kind of daunting for me and I haven't seen many well explained reasons I figured I'd finish out the post here to help anyone that is running into this or will run into it in the future.</p>
<hr />
<h1>The snag</h1>
<p>I'm using vscode for my editor and I've had this snag for a while but it's finally driving me nuts enough to ask for help.</p>
<p>When in include certain libraries I get error squiggles under the include.</p>
<p><a href="https://i.stack.imgur.com/N55Pj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N55Pj.png" alt="squiggle" /></a></p>
<p>In this case the squiggle is popping up because of the error:</p>
<blockquote>
<p>cannot open source file &quot;WProgram.h&quot; (dependency of &quot;Adafruit_MPR121.h&quot;)C/C++(1696)</p>
</blockquote>
<p><a href="https://i.stack.imgur.com/fkb2p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fkb2p.png" alt="WProgram.h error" /></a></p>
<p>At first I though the snag was because my include path needed my arduino libraries directory so I added that for the project, but I still get the snag.</p>
<p><a href="https://i.stack.imgur.com/PbI2e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PbI2e.png" alt="updating the include path" /></a></p>
<p>I did a computer wide search for the <code>WProgram.h</code> file but was not able to find it.</p>
<p><a href="https://i.stack.imgur.com/UBd1l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UBd1l.png" alt="Unable to find header file" /></a></p>
<p>The thing is, all of my sketches still compile and upload fine so for the most part I'm just able to ignore it ... <em>but the squiggle!!!!!!</em>.</p>
<p>Any ideas of how I can resolve this?</p>
 35534: <h1>The answer</h1>
<p>Like I said in the question, I found the answer after doing some searching while typing up the question itself and I want to explain it for future squiggle-haters :)</p>
<h2>WProgram.h vs Arduino.h</h2>
<p>I did a bunch of searching to try to track down what's going on and I eventually found <a href="https://forum.arduino.cc/index.php?topic=128597.0#msg967351" rel="nofollow noreferrer">this helpful (and depending on the veracity of the source, kind of sad) bit of history</a>:</p>
<blockquote>
<p>There is history of the arduino project not everyone was aware of or supposed to know. I only this much: this all started with some graduate student(s) that created the wiring platform and IDE, called wiring board and wiring &quot;programming language&quot;. This project is still active with active users like the arduino project. Then the arduino folks decide to create the arduino project based on wiring project so they took the wiring IDE (which took from the original Processing IDE), including all the libraries etc. and created the first Arduino board (slightly different than wiring board, cheaper!) called it arduino. Arduino project has not very positively acknowledged the wiring project as the source of their project and wiring folks didn't take it very well.</p>
<p>Now, that WProgram.h, is a definition file created by and for the wiring project and board. That's why it has a W on it. It has been in Arduino IDE since its beginning and was replaced by Arduino.h only recently when Arduino 1.0 was released. Now all Arduino 1.0+ IDE will use Arduino.h and not WProgram.h so if you have that plus some other old stuff, you will have to make changes to work with Arduino 1.0+ IDE.</p>
</blockquote>
<h2>The temp fix</h2>
<p>With that in mind I dove into the source file for the <code>Adafruit_MPR121.h</code> library and found where it includes the <code>WProgram.h</code> header file and commented it out.</p>
<p><a href="https://i.stack.imgur.com/UbGwH.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UbGwH.gif" alt="adjusting the source code" /></a></p>
<p>It's also worth pointing out that the pre-compiler conditional here supports the renaming of the file in newer versions of Arduino.</p>
<p><a href="https://i.stack.imgur.com/CDN9J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CDN9J.png" alt="pre-compiler conditional" /></a></p>
<p>I labeled this section of the answer as &quot;The temp fix&quot; because it involves modifying a 3rd party dependency which is normally not a great idea. Yeah it fixes it now, but as soon as I need to update this library that edit is going to get blown away and I'd need to manually do it again. In this case the update is pretty minimal so maybe that's no big deal, but if the fix was more involved, like a heavy edit, that would be a real big pain in the butt and could cause other unforeseen consequences (and I played half-life as a kid so I know that's not good).</p>
<h1>The better fix</h1>
<p>Normally I would say the better fix for this would be to clone the source repository, make the fix there, and do a pull request so the dependency itself gets updated at the source (if someone approves and merges the PR).</p>
<p>But this is a bit different, the conditional in there is actually fine as it adds backwards compatibility. It's there so that the library can support both pre-1.0 and post-1.0 arduino IDE versions. If we did a PR to cut out the <code>WProgram.h</code> reference we'd add in breaking code for anyone on the older versions.</p>
<p>So, the better solution is to appease my local compiler.</p>
<p>We know that the <code>Arduino.h</code> header for all intents and purposes is the same as the <code>WProgram.h</code>, so a almost-full-proof solution would be to fake out the <code>WProgram.h</code> file on my computer to appease the compiler.</p>
<p><a href="https://i.stack.imgur.com/qehQC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qehQC.jpg" alt="Faking WProgram.h" /></a></p>
<p>An important part to note here is that to make sure I faked it out correctly I went to the arduino repository, scrolled back through the tags, found the last tag before they switched to 1.0+, and found the WProgram.h file. Once there I grabbed the same pre-compiler check and definition for the WProgram header so I could be sure I did the correct <code>define</code> for the WProgram name.</p>
<p><a href="https://i.stack.imgur.com/iKkQR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iKkQR.png" alt="Correct WProgram define string" /></a></p>
<p>This feels like a bit of overkill because it protects me from other headers being included with the same string defined, but if that happened it would be because I <em>have</em> the WProgram file anyway, but I figured if I was going to fake it out I'd do it right.</p>
<p>This could backfire if I include a library that <em>only</em> includes <code>WProgram.h</code> and <em>not</em> the <code>Arduino.h</code> in that arduino version check conditional, but this would 100% be the case for a correction and pull request for that library.</p>
<h1>Summary</h1>
<p>So now I know that the <code>Arduino.h</code> file is the reason I'm able to compile everything correctly even with the red squiggle, I have a faked out <code>WProgram.h</code> so that my compiler can find something when looking for the file and, <em>most importantly</em>, I no longer need to look at those red squiggles under the includes :)</p>
<p><a href="https://i.stack.imgur.com/FipL6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FipL6.jpg" alt="no squiggles!" /></a></p>
<p>Next step, figure out the same thing for <code>Sam.h</code> :P</p>
 78418: <p>I recently figured out, it's way too simple.
Just tap F1 and look for this then select the configuration for &quot;Arduino&quot;.
<a href="https://i.stack.imgur.com/d0tV6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d0tV6.png" alt="enter image description here" /></a></p>
<p>(Pardon my Grammer)</p>
 72298: <p>I landed here in the same position as you, and after researching the comments mentioning <code>-DARDUINO=10813</code> and some more googling I found: <a href="https://github.com/microsoft/vscode-arduino/issues/1148" rel="nofollow noreferrer">https://github.com/microsoft/vscode-arduino/issues/1148</a></p>
<p>This led me to adding one more line to <code>defines</code> in my <code>c_cpp_properties.json</code></p>
<p>and this also removed the squiggly!</p>
<pre><code>{
    &quot;configurations&quot;: [
        {

            ...

            &quot;defines&quot;: [
                &quot;USBCON&quot;,
                &quot;ARDUINO=10813&quot;
            ],

            ...

        }
    ],

}```
</code></pre>
