From 7fc4ba7c1c89b6be92cc0da69e1549dcebb26621 Mon Sep 17 00:00:00 2001 From: Silent Date: Tue, 27 Feb 2024 14:56:11 +0100 Subject: [PATCH] FBT/uFBT: Enable C++20/GNU23 in VSCode IntelliSense (#3394) * FBT/uFBT: ms-vscode.cpptools can't be a configuration provider to itself * FBT/uFBT: Enable C++20/C23 in IntelliSense as the compilation options do --- .vscode/example/cpptools/c_cpp_properties.json | 15 ++++++--------- .vscode/example/settings.json | 4 ++-- .../.vscode/c_cpp_properties.json | 5 ++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.vscode/example/cpptools/c_cpp_properties.json b/.vscode/example/cpptools/c_cpp_properties.json index d1cac63e96..3f8d15a5d4 100644 --- a/.vscode/example/cpptools/c_cpp_properties.json +++ b/.vscode/example/cpptools/c_cpp_properties.json @@ -5,27 +5,24 @@ "compilerPath": "${workspaceFolder}/toolchain/x86_64-windows/bin/arm-none-eabi-gcc.exe", "intelliSenseMode": "gcc-arm", "compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", - "configurationProvider": "ms-vscode.cpptools", - "cStandard": "gnu17", - "cppStandard": "c++17" + "cStandard": "gnu23", + "cppStandard": "c++20" }, { "name": "Linux", "compilerPath": "${workspaceFolder}/toolchain/x86_64-linux/bin/arm-none-eabi-gcc", "intelliSenseMode": "gcc-arm", "compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", - "configurationProvider": "ms-vscode.cpptools", - "cStandard": "gnu17", - "cppStandard": "c++17" + "cStandard": "gnu23", + "cppStandard": "c++20" }, { "name": "Mac", "compilerPath": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gcc", "intelliSenseMode": "gcc-arm", "compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", - "configurationProvider": "ms-vscode.cpptools", - "cStandard": "gnu17", - "cppStandard": "c++17" + "cStandard": "gnu23", + "cppStandard": "c++20" } ], "version": 4 diff --git a/.vscode/example/settings.json b/.vscode/example/settings.json index 8199171464..00da3af2f8 100644 --- a/.vscode/example/settings.json +++ b/.vscode/example/settings.json @@ -1,6 +1,6 @@ { - "C_Cpp.default.cStandard": "gnu17", - "C_Cpp.default.cppStandard": "c++17", + "C_Cpp.default.cStandard": "gnu23", + "C_Cpp.default.cppStandard": "c++20", "python.formatting.provider": "black", "workbench.tree.indent": 12, "cortex-debug.enableTelemetry": false, diff --git a/scripts/ufbt/project_template/.vscode/c_cpp_properties.json b/scripts/ufbt/project_template/.vscode/c_cpp_properties.json index f957ee98bb..7ab146375e 100644 --- a/scripts/ufbt/project_template/.vscode/c_cpp_properties.json +++ b/scripts/ufbt/project_template/.vscode/c_cpp_properties.json @@ -5,9 +5,8 @@ "compilerPath": "@UFBT_TOOLCHAIN_GCC@", "intelliSenseMode": "gcc-arm", "compileCommands": "${workspaceFolder}/.vscode/compile_commands.json", - "configurationProvider": "ms-vscode.cpptools", - "cStandard": "gnu17", - "cppStandard": "c++17" + "cStandard": "gnu23", + "cppStandard": "c++20" } ], "version": 4