mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Keep custom "unwantedRecommendations" when generating projects for VSCode // Resolve #4383
This commit is contained in:
@ -20,7 +20,8 @@ PlatformIO Core 6
|
||||
* Improved device port finder when using dual channel UART converter (`issue #4367 <https://github.com/platformio/platformio-core/issues/4367>`_)
|
||||
* Improved project dependency resolving when using the `pio project init --ide <https://docs.platformio.org/en/latest/core/userguide/project/cmd_init.html>`__ command
|
||||
* Upgraded build engine to the SCons 4.4.0 (`release notes <https://github.com/SCons/scons/releases/tag/4.4.0>`__)
|
||||
* Do not resolve project dependencies on for the ``cleanall`` target (`issue #4344 <https://github.com/platformio/platformio-core/issues/4344>`_)
|
||||
* Keep custom "unwantedRecommendations" when generating projects for VSCode (`issue #4383 <https://github.com/platformio/platformio-core/issues/4383>`_)
|
||||
* Do not resolve project dependencies for the ``cleanall`` target (`issue #4344 <https://github.com/platformio/platformio-core/issues/4344>`_)
|
||||
* Warn about calling "env.BuildSources" in a POST-type script (`issue #4385 <https://github.com/platformio/platformio-core/issues/4385>`_)
|
||||
* Fixed an issue when escaping macros/defines for IDE integration (`issue #4360 <https://github.com/platformio/platformio-core/issues/4360>`_)
|
||||
|
||||
|
@ -3,13 +3,20 @@
|
||||
% import re
|
||||
%
|
||||
% recommendations = set(["platformio.platformio-ide"])
|
||||
% unwantedRecommendations = set(["ms-vscode.cpptools-extension-pack"])
|
||||
% previous_json = os.path.join(project_dir, ".vscode", "extensions.json")
|
||||
% if os.path.isfile(previous_json):
|
||||
% fp = open(previous_json)
|
||||
% contents = re.sub(r"^\s*//.*$", "", fp.read(), flags=re.M).strip()
|
||||
% fp.close()
|
||||
% if contents:
|
||||
% recommendations |= set(json.loads(contents).get("recommendations", []))
|
||||
% try:
|
||||
% data = json.loads(contents)
|
||||
% recommendations |= set(data.get("recommendations", []))
|
||||
% unwantedRecommendations |= set(data.get("unwantedRecommendations", []))
|
||||
% except ValueError:
|
||||
% pass
|
||||
% end
|
||||
% end
|
||||
% end
|
||||
{
|
||||
@ -21,6 +28,8 @@
|
||||
% end
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
% for i, item in enumerate(sorted(unwantedRecommendations)):
|
||||
"{{ item }}"{{ ("," if (i + 1) < len(unwantedRecommendations) else "") }}
|
||||
% end
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user