Added an error selector for Sublime Text build runner // Resolve #3733

This commit is contained in:
Ivan Kravets
2020-11-12 15:05:01 +02:00
parent ae7b8f9ecf
commit fc5ce4739c
4 changed files with 40 additions and 20 deletions

View File

@ -11,7 +11,9 @@ PlatformIO Core 5
5.0.3 (2020-??-??)
~~~~~~~~~~~~~~~~~~
- Added an error selector for `Sublime Text <https://docs.platformio.org/en/latest/integration/ide/sublimetext.html>`__ build runner (`issue #3733 <https://github.com/platformio/platformio-core/issues/3733>`_)
- Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode
- Force VSCode's intelliSenseMode to "gcc-x64" when GCC toolchain is used
5.0.2 (2020-10-30)
~~~~~~~~~~~~~~~~~~

View File

@ -4,7 +4,7 @@
% cxx_stds = STD_RE.findall(cxx_flags)
%
%
clang
{{ cxx_path }}
% if cc_stds:
{{"%c"}} -std=c{{ cc_stds[-1] }}

View File

@ -0,0 +1,22 @@
% import re
% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)")
% cc_stds = STD_RE.findall(cc_flags)
% cxx_stds = STD_RE.findall(cxx_flags)
%
%
{{ cxx_path }}
% if cc_stds:
{{"%c"}} -std=c{{ cc_stds[-1] }}
% end
% if cxx_stds:
{{"%cpp"}} -std=c++{{ cxx_stds[-1] }}
% end
% for include in filter_includes(includes):
-I{{ include }}
% end
% for define in defines:
-D{{ define }}
% end

View File

@ -5,9 +5,10 @@
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"run"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "PlatformIO",
"variants":
[
@ -15,78 +16,73 @@
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"run"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "Build"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"run",
"--target",
"upload"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "Upload"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"run",
"--target",
"clean"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "Clean"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"test"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "Test"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"run",
"--target",
"program"
],
"name": "Upload using Programmer"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"run",
"--target",
"uploadfs"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "Upload SPIFFS image"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"update"
],
"file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "Update platforms and libraries"
},
{
"cmd":
[
"{{ platformio_path }}",
"-f", "-c", "sublimetext",
"-c", "sublimetext",
"upgrade"
],
"name": "Upgrade PlatformIO Core"