Syntax highlighting for QSP language in Visual Studio Code

slonon c55183da0a fixes formatting 3 年 前
qsrc c4305a1b1e Changes folder structure: includes snippet file via manifest; improves code folding enables auto-indentation 3 年 前
README.md c55183da0a fixes formatting 3 年 前

README.md

QSP language syntax highlighting for Visual Studio Code

No known bugs.

Features:

  • Multiline comments work now
  • Codefolding improved
  • automatic indentation added

General usage:

  • Copy qsrc folder to %homepath%\.vscode\extensions

Snippet usage:

  • type loop, for, foreach or jump and hit [Enter] for the Loop code snippet
  • [Tab] through the variables to rename them

Customize formatting

Modify settings.json (location: %appdata%\Code\User\)

  • Example content:

    {
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "source.qsp comment",
                "settings": { "foreground": "#bdbdbd" }
            },
            {
                "scope": "source.qsp variable.other.user",
                "settings": { "foreground": "#058bad" }
            },
            {
                "scope": "source.qsp keyword.control",
                "settings": {"fontStyle": "bold", "foreground": "#4c4cff" }
            },
            {
                "scope": "source.qsp meta.preprocessor",
                "settings": { "foreground": "#268BD2" }
            },
            {
                "scope": "source.qsp error",
                "settings": { "foreground": "#d40707" }
            }
        ]
    }
    }
    
  • Simple modification for Dark+ or Dark (Visual Studio) theme:

    {
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "source.qsp keyword.control.act",
                "settings": { "foreground": "#68e6a7" }
            },
        ]
    }
    }
    
  • Custom modification for Dark+ or Dark (Visual Studio) theme:

    {
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "source.qsp meta.preprocessor",
                "settings": { "foreground": "#a5a5a5" }
            },
            {
                "scope": "source.qsp entity.name.function.language",
                "settings": { "foreground": "#e8f09e" }
            },
            {
                "scope": "source.qsp entity.name.function.include",
                "settings": { "foreground": "#d5e06d" }
            },
            {
                "scope": "source.qsp entity.name.function.display",
                "settings": { "foreground": "#e7c0a6" }
            },
            {
                "scope": "source.qsp variable.language",
                "settings": { "foreground": "#86b6dd" }
            },
            {
                "scope": "source.qsp keyword.control.act",
                "settings": { "foreground": "#68e6a7" }
            }
        ]
    }
    }
    

Resources:

original source

Docs: manifest file, language config, user snippets, regex quick ref