• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

VSCode Extension for Cerberus

adamredwoods

New member
3rd Party Tool Dev
Joined
Jun 23, 2017
Messages
42
Visual Studio Code extension for Cerberus Programming Language

To use, download the VSIX file (you don't need all the files there, just the VSIX), then in VSCode select the Extensions Tab and click the 3-dot menu and "Install from VSIX". Select the VSIX file.
You may need to click the reload prompt in the corner. Afterwards, find the extension configuration and set the transcc path for your system.

To build, find the command menu (control-shift-p) and type Cerberus to select which build you would like. Hotkeys can be assigned. The extension offers configuration for build arguments. For now it only builds whichever file you current have active/selected.

If you would like to expand on the language highlights, feel free to make a PR in GitHub.

v0.9.0 - initial commit (updated! 8/25)
v0.9.1 - adds correct tab structure, adds custom target

Features:
- syntax highlighting (it's not perfect, because VSC uses regex expressions and it becomes a bit cumbersome. Will try to improve.)
- support for multiple build targets, and customizable arguments
- supports the monkey extension
- mac/win/linux

TODO:
- enable "main" file for projects
 
Last edited:
Cool, I am sure there will be some who love this. Thanks for sharing.
 
I tried the installation of the vsix file and got this error:
Corrupt ZIP: end of central directory record signature not found
 
Ok, please try again. It seems there were a couple problems with widows. It's now working on my test machine: Windows 10, VSCode 1.30.1.
 
Thanks a lot! Now it works.
 
Just out of curiosity, are you planning to add build scripts and a debugger?
 
For build scripts do you mean custom target? I can add that.

I was thinking about debuggers, but I wasn't sure how Cerberus handles them currently. For now, I'd say it's not a priority over MiniB3D (unless I need it).
 
For build scripts do you mean custom target? I can add that.

I was thinking about debuggers, but I wasn't sure how Cerberus handles them currently. For now, I'd say it's not a priority over MiniB3D (unless I need it).
I built a standalone debugger for BlitzMax, years ago. Unfortunately, I no longer have the source. However, if I recall correctly, it was fairly straightforward. I have looked at doing a debugger in VS Code myself, but I get very confused every time I try to work it out.
 
@adamredwoods do you think, that all existing functionality of Ted, inxluding a funtion/method list, could be build into this extension?
 
VS Code can show markdown built-in. So we could create a Cerberus command that pops up the markdown file. I know the docs are written in cerberus-down, but they can be converted with a regex script.

It is possible to create a custom tree view, but that's a lot of overhead, as it'd have to parse files to build the tree.
https://github.com/microsoft/vscode/blob/master/extensions/npm/src/npmView.ts

Debugging is a bigger issue, but there seems to be support for it. Currently, it is possible to control-click on the error in the output, and it will take you directly to that line and file.
 
Idiot level question: Will it be possible to integrate your 'version' of VS code with CX at some point? Something like Kha does: http://kha.tech/
 
Idiot level question: Will it be possible to integrate your 'version' of VS code with CX at some point? Something like Kha does: http://kha.tech/
Kha has an editor that is based on VSCode. Means they took the open source version which lacks a lot the stuff that is build into Microsofts version and built upon that.
 
Idiot level question: Will it be possible to integrate your 'version' of VS code with CX at some point? Something like Kha does: http://kha.tech/
What does Kha do that is needed for CX? I don't know Kha.

I've been thinking about integrating code hints, but I need to see if it slows down VSC, I prefer speed with my editors over code hints. I am also trying to get a CX docs menu, I managed to get a node tree up in a little box on VSC, but I need to figure out how to get the docs to display. Sadly for CX, all the docs are not true markdown, but rather a hybrid. IMO, we need to move the CX docs to markdown. This could be done with automation.
 
What does Kha do that is needed for CX? I don't know Kha.
I just meant that VS Code has been integrated into the Kha project, could VS code (open source version) be used for CX in the same way?
 
I think it would be better to integrate CX into VSCode, through extensions, which is what I'm attempting to do.

> Does it only support pure Markdown or something else too?
As far as I know, only markdown.
 
Btw. your extention... it always tries to call MaxOs tools when building stuff. Are the paths hardcoded or are there settings I can change?
 
Back
Top Bottom