[Pas2js] VS Code extensions in Pas2JS

Michael Van Canneyt michael at freepascal.org
Sun Dec 27 16:03:59 CET 2020


Hello,

Earlier this week, I committed and announced support for creating Atom packages.
I then promised to commit VS Code extension support.

I didn't make it for Christmas, but today nevertheless, VS Code extension
support has been committed :-)

It allows you to create VS Code extensions with Pas2JS.
The full VS Code API is available (just as the Atom API is available) in the
"libvscode" unit. A "vscodeapp" unit is also available.

I have created a "hello, world" demo (see attached screenshots).

The Lazarus IDE has been extended with a 'VS Code Extension' project type.
It will create a skeleton extension, much as the Atom Package wizard does.

The created skeleton extension contains the necessary support files to work
on the extension in VS Code:
* build the extension (using the default Build command: ctrl-shift-B) 
* launch VS Code with the package installed (using Ctrl-F5).

In view of the popularity of VS Code, I would like to ask:

Please consider contributing some examples to pas2js which demonstrate the
various APIs of VS Code. They need not be big, just enough to demonstrate an
API.

I of course expect now to see lots of pas2js VS Code extensions appearing in
the coming weeks and months :-)

For the really brave:

* Consider integrating pas2js itself in VS Code: the compiler can be run in
node.js, so it can also be run as part of VS Code, no need to launch an
extenal executable :-)

* Consider compiling the Lazarus code tools for use in VS Code.
   If succesful, they will do a lot better than the omnipascal tools.

* When TMS Software has an API for their VS Code plugin, consider
   contributing to that as well: the more Object Pascal the better.

* In general: Go wild :-)

A warning: the VS Code API is HUGE (4000 lines), this is currently 
slightly more than the web unit :)

If you notice any shortcomings in the API, please let me know and I will
correct as soon as possible.

Enjoy,

Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vscode.png
Type: image/png
Size: 30359 bytes
Desc: 
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201227/90e85bd7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vscode2.png
Type: image/png
Size: 37812 bytes
Desc: 
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201227/90e85bd7/attachment-0003.png>


More information about the Pas2js mailing list