Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Editing M2 on Visual Studio Code, anyone?

122 views
Skip to first unread message

trijezdci

unread,
Jun 12, 2018, 7:12:55 AM6/12/18
to
Does anyone have a Modula-2/Oberon/Pascal syntax specification file for Visual Studio Code to do syntax highlighting?

Chris Burrows

unread,
Jun 12, 2018, 8:29:19 AM6/12/18
to
On Tuesday, June 12, 2018 at 8:42:55 PM UTC+9:30, trijezdci wrote:
> Does anyone have a Modula-2/Oberon/Pascal syntax specification file for Visual Studio Code to do syntax highlighting?

My understanding is that VS Code uses TextMate-compatible syntax specification files. Google modula2.tmLanguage or oberon.tmLanguage for some example specification files.

There are also a number of ready-made Oberon / FreePascal / Delphi VS Code extensions available in the VS Code marketplace.

When evaluating them I recommend using a simple test that we used when looking for Oberon syntax-editing specifications to use in our CPIde and Astrobe editors. i.e. can it handle nested comments?

If you have a working example, open a large file and insert '(*', or maybe '{' (for Delphi / FreePascal) at some arbitrary point. If it can't handle that then there is not much point looking any further.

Regards,
Chris Burrows
CFB Software
http://www.astrobe.com

trijezdci

unread,
Jun 19, 2018, 9:52:42 AM6/19/18
to
On Tuesday, 12 June 2018 21:29:19 UTC+9, Chris Burrows wrote:
> > Does anyone have a Modula-2/Oberon/Pascal syntax specification file for Visual Studio Code to do syntax highlighting?
>
> My understanding is that VS Code uses TextMate-compatible syntax specification files. Google modula2.tmLanguage or oberon.tmLanguage for some example specification files.

Thanks. According to the information I have, VS Code uses JSON files. Even so, I have a complete set of TM specs for PIM, ISO and R10

https://github.com/m2sf/modula2.tmbundle/tree/master/Syntaxes

but VS Code does not seem to recognise them.

Then again, my .vscode directory happens to be completely empty and I wonder where MSFT has hidden all the default language specs. As usual, the MSFT online documentation is written only for Windows. The .vscode directory is empty. I have done a global search, I can't find the files.

Chris Burrows

unread,
Jun 19, 2018, 5:56:51 PM6/19/18
to
On Tuesday, June 19, 2018 at 11:22:42 PM UTC+9:30, trijezdci wrote:
>
> Then again, my .vscode directory happens to be completely empty and I wonder where MSFT has hidden all the default language specs. As usual, the MSFT online documentation is written only for Windows. The .vscode directory is empty. I have done a global search, I can't find the files.

On my system the extensions (and consequently the *.tmlanguage files) are stored in the following folder tree:

Program Files (x86)\
Microsoft Visual Studio\
2017\
Community\
Common7\
IDE\
Extensions\
uhuqfcub.t3o\
StarterKit\
Extensions

Alternatively search for *.tmLanguage in the 'Program Files (x86)' folder tree,

Regards,
Chris Burrows
CFB Software
http://www.cfbsoftware.com/modula2


trijezdci

unread,
Jun 21, 2018, 3:01:12 AM6/21/18
to
On Wednesday, 20 June 2018 06:56:51 UTC+9, Chris Burrows wrote:
> On Tuesday, June 19, 2018 at 11:22:42 PM UTC+9:30, trijezdci wrote:
> >
> > Then again, my .vscode directory happens to be completely empty and I wonder where MSFT has hidden all the default language specs. As usual, the MSFT online documentation is written only for Windows. The .vscode directory is empty. I have done a global search, I can't find the files.
>
> On my system the extensions (and consequently the *.tmlanguage files) are stored in the following folder tree:
>
> Program Files (x86)\

Thanks, but that looks like Windows to me. I don't use Windows and on my system the folder hierarchy looks nothing even remotely like it.

Like I said, I did a global search and there are no tmLanguage files anywhere (other than the Modula-2 ones I wrote myself which are in my development folder).

Marco van de Voort

unread,
Jun 21, 2018, 4:44:52 AM6/21/18
to
On 2018-06-21, trijezdci <trij...@gmail.com> wrote:
>
> Thanks, but that looks like Windows to me. I don't use Windows and on my system the folder hierarchy looks nothing even remotely like it.

(moreover, it probably wasn't VS /code/, just proper native VS (community edition)

Chris Burrows

unread,
Jun 22, 2018, 4:29:17 AM6/22/18
to
Yes - that makes more sense. I had another look on my system and the VS Code extensions are stored in the <User folder>\.vscode\extensions folder. However, only the ones I have added are visible there. And, yes, they are javascript / json files.

trijezdci

unread,
Jun 22, 2018, 9:40:51 AM6/22/18
to
On Friday, 22 June 2018 17:29:17 UTC+9, Chris Burrows wrote:
> > (moreover, it probably wasn't VS /code/, just proper native VS (community edition)
>
> Yes - that makes more sense. I had another look on my system and the VS Code extensions are stored in the <User folder>\.vscode\extensions folder. However, only the ones I have added are visible there. And, yes, they are javascript / json files.

Indeed, I have a ~/.vscode/extensions directory but like I said, its empty and I can't find any files anywhere for the languages that come with VS Code.

Chris Burrows

unread,
Jun 22, 2018, 7:15:02 PM6/22/18
to
On Friday, June 22, 2018 at 11:10:51 PM UTC+9:30, trijezdci wrote:
>
> Indeed, I have a ~/.vscode/extensions directory but like I said, its empty and I can't find any files anywhere for the languages that come with VS Code.

On my Windows system they are located in C:\Program Files\Microsoft VS Code\resources\app\extensions folder subtree. I'm surprised that a system-wide search on your system didn't find any related .json files. Maybe a Linux / MacOS user here can throw some light on this?

0 new messages