apio icon indicating copy to clipboard operation
apio copied to clipboard

[Feature Request] Provide an apio plugin for Visual Studio Code.

Open zapta opened this issue 1 year ago • 1 comments

Visual Studio Code is a very popular general purpose IDE if not the most popular. This request is for a VSC plugin for apio that will simplified the installation and use of APIO. The requirements are straight forward and platformio's successful plugin can be used as a good starting point.

Key requirements

  1. Automatic and software installation and updates are done by the plugin.
  2. The plugin is isolated from the system, having its own python environment and other necessary dependencies.
  3. Allows to edit/verify/build/test/simulate/upload
  4. Verilog editing support such as coloring and code formatting.
  5. Creation of skeleton new project (user selects board).

zapta avatar Jun 21 '24 14:06 zapta

Implementation level from easy to hard

  1. Document how to use apio with VCS now. E.g. building within VCS terminal, jumping from error messages to the source location, etc.

  2. Have a thin extension that take affect when opening a folder with apio.ini and provide buttons for `apio build / lint / sim / test / upload'

  3. Same as the above but also install apio automatically by installing the VCS extension.

zapta avatar Jun 02 '25 20:06 zapta

Playing with a proof of concept here https://github.com/zapta/apio-vscode . The extension is built by a workflow and can be side loaded in VSCode using the install from VSIX command.

Image

When opening in VSCode an apio project folder (which as an apio.ini file), the extension is activated and a few apio command button are shown at the bottom and clicking them executes the apio command.

Image

EDIT: Tested on macOS, will test also on windows and linux.

zapta avatar Nov 07 '25 05:11 zapta

Great feature @zapta !!

cavearr avatar Nov 07 '25 06:11 cavearr

Hi @cavearr, can you create a apio-vscode repository and give me access?

Please use the same configuration as apio-examples (issues disabled, workflow action enabled, etc)

zapta avatar Nov 09 '25 01:11 zapta

Hi @cavearr, can you create the repository?

zapta avatar Nov 10 '25 15:11 zapta

Done! sorry for the delay! @zapta

cavearr avatar Nov 10 '25 15:11 cavearr

Thanks @cavearr !

zapta avatar Nov 11 '25 04:11 zapta

Hi @cavearr, the first version of the Apio VSCode extension is ready for publishing, if you want to play with it, you can download the .vsix and install locally from VSCode's extensions menu, then open a project folder that has apio.ini in it and the extension will activate. https://github.com/FPGAwars/apio-vscode/releases

Can you please take care of publishing it in the VSCode extension market under the name 'Apio FPGA'? I could do that myself but prefer that you will deal with the FPGAwars credentials. Once the first version is publish, we can have a .github workflow that publish it using a github secret.

Here is a Grok prompt that outline the steps:

Grok, I developed a new VSCode extension called 'Apio FPGA' that I want to publish for the first time under the organization name 'FPGAwars'. The extension code has a dedicated github repo 'fpgawars/apio-vscode' and already have the .vsix package file but neither me nor the organization have any Microsoft or VSCode Market credentials. Give me a summary of the steps I need to perform.

zapta avatar Nov 15 '25 18:11 zapta

Very interesting feature @zapta ! i'm deal with it this weekend i'm telling you soon.

cavearr avatar Nov 15 '25 18:11 cavearr

Hi @cavearr, did you have a chance to register it in the market?

I added to the extension the ability to auto install apio on the fly with no prerequisites such as python. Should work on windows x86, mac arm 64, and linux x86.

zapta avatar Nov 17 '25 21:11 zapta

I haven't been able to do it yet, I'll try to make sure it doesn't go past tomorrow.

cavearr avatar Nov 17 '25 21:11 cavearr