VSCode Extension for Cerberus

  • Visual Studio Code extension for Cerberus Programming Language
    [URL unfurl="true"]https://github.com/adamredwoods/Cerberus-VSCodeExtension[/URL]

    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

  • 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.

  • 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).

  • [QUOTE="adamredwoods, post: 6485, member: 18"]
    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).
    [/QUOTE]
    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.

  • 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/vsco…/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.

  • [QUOTE="Paul59, post: 6841, member: 350"]
    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/
    [/QUOTE]
    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.

  • [QUOTE="Paul59, post: 6841, member: 350"]
    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/
    [/QUOTE]
    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.

  • [QUOTE="adamredwoods, post: 6876, member: 18"]
    What does Kha do that is needed for CX? I don't know Kha.
    [/QUOTE]
    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?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!