Visual Studio Code Extension syntax highlighter

A place to share your useful hints for getting the most from Proclaim, be it as a user or an administrator.

Example maths items are best placed in the "Example Proclaim Maths" topic.
Post Reply
steve
Posts: 397
Joined: Wed Nov 30, 2011 10:20 pm
Been thanked: 83 times

Visual Studio Code Extension syntax highlighter

Post by steve » Tue Aug 13, 2019 11:15 am

I've been working on a Visual Studio Code Language Extension for Proclaim Maths script.

Features:
* syntax highlighting (VSCode grammar)
* code folding/indenting
* snippets framework and basic example

Getting started:
* in VS Code, click Extensions and search for "Proclaim"
* Install the extension "Proclaim Maths Script". current version 0.1.1 at 13/8/19
* Try it out by opening Examples/test.pro:
* the Extension adds "Proclaim Maths Script (.pro)" file support - creating/editing a .pro file will invoke the Language Extension.

Major releases I will push through to the VS Marketplace,
For the bleeding edge, check the GitHub repository for dev releases, notes on how to edit the extension yourself, and notes on how to contribute the development.

I see great potential for snippets to help with sample code structures.

I have added a demo snippet for IF THEN ELSE END block, but can see it would be useful for e.g. sample looping through tables, strings, search-and-replace etc that are demonstrated on the forum

It's a work in progress, so expect some bugs at this early stage.

Github:
https://github.com/proclaimforum/vscode ... t-language

Not sure where best to discuss - here or on Github... I think here to begin with as not all the audience will necessarily do Git.

Steve
Last edited by steve on Tue Aug 13, 2019 11:43 am, edited 3 times in total.

steve
Posts: 397
Joined: Wed Nov 30, 2011 10:20 pm
Been thanked: 83 times

Re: Visual Studio Code Extension syntax highlighter

Post by steve » Tue Aug 13, 2019 11:20 am

interestingly the Proclaim Maths edit has basic 'intellisense' for keywords if you hit Ctrl-Space (built-in to the CodeJock Syntax Edit module) but it just auto-completes keywords. Not sure if the CodeJock module accepts anything else other than keyword definitions - i.e. if we could improve the built-in support with our own .schclass definition to include sample code structures such as loops

Post Reply