Discord
Login
Community
DARK THEME

I have made an extension for highlighting microScript code in VS Code.

https://github.com/Fast-and-Pythonic/microScript-TextMate-syntax-highlighting-for-VSCode

This is an extension of SYNTAX highlighting according to the TextMate standard for microScript language, for VS Code. It's syntactic. NOT SEMANTIC.

To install the extension:

  • 1 - Put the “microScript-syntax-highlighting” folder in the “.vscode\extensions” directory.

  • 2 - Enter the command ">Developer: Install Extension from Location...".

  • 3 - Select the folder “microScript-syntax-highlighting".

  • 4 - And after installing the extension, restart VS Code.

My custom code theme, based on "ACE Tomorrow Night Bright". It is specially optimized for microScript syntax.

In the file "ms-color (ACE Tomorrow Night Bright)-like.jsonc" there is a custom analogue of the standard code color theme from microStudio. Just transfer the code from this file to your "settings.json" file. This custom code color theme is better designed to highlight the syntax of microScript than the standard code color themes.


Added code highlighting for:

  • Comments

  • Keywords:

    • local, global

    • end, return

    • if, elsif, else, then

    • and, or, not

    • while, for, to, by, in, break, continue

    • function, object, class, constructor, extends, super, this, new

    • do, after, every, sleep

  • Mathematical operators:

    = + - * / % ^

    += -= *= /= %=

    == != <= >=

    & | << >>

  • Numbers

  • Booleans

  • Strings

  • In brackets of functions and classes:

    • Named parameters
    • and all the other stuff (comments, keywords, math operators, numbers, booleans, strings)
    • arguments ARE NOT HIGHLIGHTED
  • Variable names ARE NOT HIGHLIGHTED


Screenshots with examples of highlighting microScript code

Снимок экрана 2025-05-08 135415

Other screenshots: https://github.com/Fast-and-Pythonic/microScript-TextMate-syntax-highlighting-for-VSCode/blob/main/Screenshots%20of%20the%20code%20highlighting.md


I plan to add a few more pieces in the future:

  • Highlighting the tools of the microScript standard library - Functions, System Classes, and etc...
  • Add some missing keywords.
  • I'll try to post the extensions on VS Code Marketplace. To make them easier to install.
  • Also, I will most likely make 2 versions of the extension:
    • 1 - My own microScript code highlighting color theme, based on the “Tomorrow Night Bright” theme.
    • 2 - An almost complete analog of the standard “Tomorrow Night Bright” theme from the Ace editor in microStudio.

The extension is based on the TextMate standard. Many editors support the TextMate standard. Therefore, this highlight can be ported to other editors.

Cool! Thank you very much! I also really miss the opportunity to edit microScript code in adult editors, with all their huge set of tools, like VS Code.

Here is another similar project. I think you can get some ideas from there.

https://github.com/DeRaNGeR/microscript-language-extension

lazy_sinner, I took a look at that project you linked to. Yes. There are indeed things I missed. Thank you very much.

  • I will add some missing keywords.

  • And now it will be easier to make highlighting of functions and classes from the standard library.

  • I'll try to post the extensions on VS Code Marketplace. To make them easier to install.

  • Also, I will most likely make 2 versions of the extension:

    • 1 - My own microScript code highlighting color theme, based on the “Tomorrow Night Bright” theme.
    • 2 - An almost complete analog of the standard “Tomorrow Night Bright” theme from the Ace editor in microStudio.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community