diff --git a/integration/ide/vscode.rst b/integration/ide/vscode.rst index a5e6665adf..bcd06a1b37 100644 --- a/integration/ide/vscode.rst +++ b/integration/ide/vscode.rst @@ -148,6 +148,9 @@ Each button contains hint (delay mouse on it). 7. Project environment switcher (if more than one environment is available). See :ref:`projectconf_section_env` of :ref:`projectconf` . +You can override default buttons and create your own toolbar. +See ``platformio-ide.toolbar`` in :ref:`ide_vscode_settings`. + .. _ide_vscode_pio_core_cli: PlatformIO Core (CLI) @@ -380,12 +383,6 @@ Settings `How to configure VSCode settings? `__ -``platformio-ide.activateOnlyOnPlatformIOProject`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If true, activate the ``platformio ide`` extension only when a -PlatformIO-based project (that has a :ref:`projectconf`) is open in the -workspace. The default value is ``false``. - ``platformio-ide.activateProjectOnTextEditorChange`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Automatically activate project depending on an active opened text editor. @@ -406,12 +403,10 @@ The default value is ``true``. If true, automatically rebuild the C/C++ Project Index when :ref:`projectconf` is changed or when new libraries are installed. The default value is ``true``. -``platformio-ide.buildTask`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The build task (label) that is launched by the "Build" button in the -:ref:`ide_vscode_toolbar` and :ref:`ide_vscode_keybindings`. The default is ``PlatformIO: Build``. - -You can create custom :ref:`ide_vscode_custom_task` and assign one of them to ``platformio-ide.buildTask``. +``platformio-ide.showEditorTitleShortcuts`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Show Build, Upload, Clean, and other buttons in the editor title bar. +The default value is ``true``. ``platformio-ide.autoPreloadEnvTasks`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -423,15 +418,6 @@ Custom PATH for the ``platformio`` command. Paste here the result of ``echo $PAT (Unix) / ``echo %PATH%`` (Windows) command by typing into your system terminal if you prefer to use a custom version of :ref:`piocore`. The default value is ``null``, meaning PlatformIO looks for the ``platformio`` command in the system path. -``platformio-ide.disableToolbar`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Disable the PlatformIO toolbar. The default value is ``false``. - -``platformio-ide.forceUploadAndMonitor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If true, the Upload (``platformio-ide.upload``) command is changed to -use the "Upload and Monitor" task. The default value is ``false``. - ``platformio-ide.reopenSerialMonitorDelay`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Configure the time in milliseconds before reopening the Serial Port Monitor. @@ -461,12 +447,70 @@ PlatformIO Home server HTTP host.The default is ``127.0.0.1``, but in case of do ``platformio-ide.pioHomeServerHttpPort`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PlatformIO Home server HTTP port. The default value ``0`` automatically assigns a free port in -the range [8010..8100]). +the range [45000..45999]). ``platformio-ide.customPyPiIndexUrl`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Custom base URL of the Python Package Index (default ``https://pypi.org/simple``). +``platformio-ide.toolbar`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configure your own :ref:`ide_vscode_toolbar` with your own buttons and attach commands to them. +There is no limitation to command scope. You can use `Built-in VSCode Commands `__ +or commands from your 3rd party favorite extensions. + +The button can be text, an icon, or a mix of them. The list of supported icons is documented in `VSCode Icon Listing `__. +You can have different toolbars per workspace thanks to the `User and Workspace Settings `__. + +**Example** + +.. code:: javascript + + { + "platformio-ide.toolbar": [ + { + "text": "Clean All", + "commands": [ + { + "id": "workbench.action.tasks.runTask", + "args": "PlatformIO: Clean All" + } + ] + }, + { + "text": "$(list-selection)", + "tooltip": "List devices", + "commands": [ + { + "id": "platformio-ide.runPIOCoreCommand", + "args": "pio device list" + } + ] + }, + { + "text": "$(plug)", + "commands": [ + { + "id": "platformio-ide.runPIOCoreCommand", + "args": "pio device monitor --filter time" + } + ] + }, + { + "text": "$(terminal)", + "commands": [ + { + "id": "workbench.action.terminal.sendSequence", + "args": { + "text": "echo 1\n" + } + } + ] + } + ] + } + Known issues ------------