arduino-ide/arduino-ide-extension
per1234 083a7069f0 Add leading+trailing line break to "Copy for Forum" content
Arduino IDE's "Edit > Copy for Forum (Markdown)" feature copies the contents of the currently selected editor tab to the
clipboard, with "fenced code block" markup added to provide correct formatting when the content is posted to a platform
supporting Markdown language such as Arduino Forum, GitHub, Stack Exchange, etc.

One of the most common points of friction between the volunteer helpers on the forum and the newcomers requesting
assistance is the failure to use the correct markup when posting code. In the best case scenario the code and thread is
made less readable and less convenient to copy to the IDE for further investigation. Components of the code often
resemble markup, which causes it to be corrupted by the forum's renderer.

Even in cases where the user was conscientious enough to attempt to add the right markup, which is facilitated by tools
such as "Copy for Forum (Markdown)", they often still don't get it quite right. So it is worthwhile to make efforts to
make it less likely for the markup to be inadvertently invalidated.

"Fenced code block" markup must be on its own lines before and after the code content. Someone not familiar with
Markdown won't know this fact and may simply paste the content copied via "Copy for Forum (Markdown)" without manually
adding a newline before and after. Since the code content is preceded and succeeded by a newline, they will not have any
visual indication of a problem.

Adding a newline before and after the content will ensure the markup is valid regardless of the context it is pasted
into. In cases where the user did add a newline and this introduces a redundant line break in the forum post, it will
not have any effect on the rendered content because the additional newlines are ignored by the renderer.
2023-02-03 04:58:15 -08:00
..
2022-11-02 15:48:04 +01:00
2022-08-15 08:42:31 -07:00

Arduino IDE Extension

Arduino IDE is based on Theia, and most of its IDE features, UIs and customizations are implemented in this Theia extension.

IDE Services

IDE services typically have a backend part in src/node/ and a front-end part in src/browser/.

Boards Service

The Boards Service continuously checks the computer's ports, in order to detect when you connect or disconnect an Arduino board.

The Boards Manager lists all the known board types, and allows downloading new cores to get additional board types.

Core Service

The Core Service is responsible for building your sketches and uploading them to a board.

Serial Service

The Serial Service allows getting information back from sketches running on your Arduino boards.

Config Service

The Config Service knows about your system, like for example the default sketch locations.

"arduino" configuration in the package.json:

  • "cli":
    • "version" type string | { owner: string, repo: string, commitish?: string }: if the type is a string and is a valid semver, it will get the corresponding released CLI. If the type is string and is a date in YYYYMMDD format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in the owner/repo will be used. If commitish is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.

Rebuild gRPC protocol interfaces

  • Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command yarn --cwd arduino-ide-extension generate-protocol

Update clangd and ClangFormat

The clangd C++ language server and the ClangFormat code formatter tool dependencies are managed in parallel. Updating them to a different version is done by the following procedure:

  1. If the target version is not already available from the arduino/clang-static-binaries repository, submit an issue there requesting a build and wait for that to be completed.
  2. Validate the ClangFormat configuration for the target version by following the instructions here
  3. Submit a pull request in the arduino/arduino-ide repository to update the version in the arduino.clangd.version key of package.json.
  4. Submit a pull request in the arduino/tooling-project-assets repository to update the version in the vars.DEFAULT_CLANG_FORMAT_VERSION field of Taskfile.yml.

Customize Icons

ArduinoIde uses a customized version of FontAwesome. In order to update/replace icons follow the following steps:

  • import the file arduino-icons.json in Icomoon
  • load it
  • edit the icons as needed
  • !! download the new arduino-icons.json file and put it in this repo
  • Click on "Generate Font" in Icomoon, then download
  • place the updated fonts in the src/style/fonts directory