Skip to content

Argmaster/vscode-gerber-format-support

Repository files navigation

Gerber X3/X2 Format Support

Gerber X3/X2 Format Support extension brings The Gerber Layer Format Specification support to Visual Studio Code.

Installation help

For full installation guide, please refer to this documentation.

Features

Opening new file with one of typical Gerber file extensions should allow Gerber X3/X2 Format Support extension to automatically detect the language as Gerber. If language is not detected automatically, You may click in bottom right corner on Plain Text to change language to Gerber.

select_language

find_and_select_language

Afterwards all extension features should be available.

1. Syntax highlighting

image

2. Language Server using PyGerber

This extension utilizes PyGerber 2.1.0+ builtin Gerber language server.

⚠️ Warning

To use this feature you will need to install Python 3.8+ on your device and Visual Studio Python Extension from Microsoft (ms-python.python).

After starting this extension for the first time you will be presented with popup in bottom right corner asking if you want to install PyGerber automatically. Currently it is recommended to use this option, as alternatives are not well polished.

image

1. Gerber X3 Rev. 2023.03 reference

hover_hint_d01

2. Live suggestions (limited functionality)

image

3. Quick rendering (limited customization)

image

image

image

This view now allows zooming with ctrl + scroll and move with hold left mouse button + move mouse. Window must be focused to allow those actions. To focus render view click inside it.

Issues and bugs

Please report all issues and encountered bugs to Issue section on Github.

Future plans

  • full syntax highlighting support, including all Gerber X2 commands.
  • deprecated syntax warnings
  • interactive suggestions
  • integration with PyGerber for interactive visualization
  • good practices linting
  • pretty formatting
  • minification
  • ...?