Automatically add "${default}" when generating c_cpp_properties.json and a C_Cpp.default.* property is set #3733
Labels
Feature: Configuration
An issue related to configuring the extension or IntelliSense
Feature Request
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
quick fix
Milestone
Type: LanguageService
This is coming from a new C/C++ user of VSCode (I've coded in C/C++ for a long time, and in VSCode for other languages for a couple years now), but I found this unintuitive (= spent an hour pulling my hair out). Some of it is definitely confusion over where pieces of VSCode live and what belongs to whom, but it's just from installing the "C/C++ extension" to do C/C++ development.
Describe the bug
Intellisense does not examine/respect/yell at silly users who update the
C_Cpp.default.includePath
setting insettings.json
in a way that conflicts withincludePath
inc_cpp_properties.json
.To Reproduce
cannot open source file "gtk/gtk.h"
c_cpp_properties.json
file (accidentally) by invoking the UI. I got there through a tooltip in the lower-right corner, but this is displayed inconsistently; to consistently get there, invoked the commandC/C++: Edit configurations (UI)
./usr/include
.cannot open source file "gtk/gtk.h"
a. Realize your mistake, and that the correct command to get the include directories for GTK is
pkg-config --cflags-only-I gtk+-3.0 | xargs -n 1 echo | sed -e 's/^-I//' | sort | uniq
.b. Sadly, this bit of arcane knowledge will not win any bar bets.
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit.
includePath
.settings.json
.a. Note the lack of mention of
c_cpp_properties.json
.settings.json
:cannot open source file "gtk/gtk.h"
Expected behavior
Intellisense settings aren't so far removed from VSCode-native integration. That could be abolishing the separate
c_cpp_properties.json
file so it's all managed through the VSCode native settings dialog, automagically merging the two, etc.Less preferred, but still would've saved me time: yelling at the user when folder-based
settings.json/C_Cpp.default.includePath
andc_cpp_properties.json/configurations.includePath
are both set/conflict andsettings.json
is being ignored.Screenshots
Additional context
The text was updated successfully, but these errors were encountered: