Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Greybel VSNew to Visual Studio Code? Get it now.

Greybel VS

_ayecue

|
259 installs
| (0) | Free
Toolkit for GreyScript.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

greybel-vs

GreyScript toolkit for Grey Hack. Includes highlighting, code execution, bundling and minifying among other features. Checkout the changelog to get information on the latest changes.

Based on greybel-js.

If you need some GreyScript API information you can also checkout greyscript-meta.

Usage

Automatically detects .gs and .src files.

Commands available (CTRL+SHIFT+P):

  • Greybel: Build - info
  • Greybel: Goto Error - info
  • Greybel: Transform - info
  • Greybel: Minify - Shortcut for info. Will use minifiy as build type.
  • Greybel: Beautify - Shortcut for info. Will use beautify as build type.
  • Greybel: Refresh - info
  • Greybel: API - info
  • Greybel: Snippets - info

You can also access most of the commands via the context menu:

Context Menu

Do not forget to setup your plugin to your needs. Following settings are available:

  • Activate/Deactivate
    • Autocomplete
    • Hoverdocs
    • Installer
  • Transpiler specific
    • Build type
    • Disable literals optimization
    • Disable namespaces optimization
    • Environment variables
    • Excluded namespaces when optimizing
    • Obfuscation
  • Installer specific
    • Define max characters per file

Features

  • Syntax Highlighting
  • Transform
  • Build
  • Interpreter
  • Debugger
  • API Browser
  • Snippets
  • Goto Error
  • Providers
    • Autocompletion
    • Hover Tooltips
    • Diagnostics
    • Symbol
    • Definition
    • Colorpicker

Transform

Transforms the content of the active text document into one of three possible output types:

  • Default (active by default): Minor optimizations
  • Uglify: Minified
  • Beautify: Beautified

Minified File

It will also fill environment values with it's value which you are able to define in the configuration of this extension.

Env Settings

You can also exclude namespaces from getting transformed.

Exclude namespaces

More details here.

Build

Transforms and bundles your files which makes it easier to import them into GreyHack. As described in the transform section it has three possible transformation types and supports environment variables as well.

Build output

Keep in mind to activate the installer to enable bundling in case you are using import_code in your code.

You can also select the max characters per file which will then split the installer files into the selected size.

Max chars

More details here.

Interpreter

Executes GreyScript code. Almost all intrinsics are fully supported. To get more information which intrinsics are supported click here.

It also features a mock environment and debugger.

Start debug

After you pressed run a prompt will appear to input the parameters for the execution.

Enter params

Since the latest update it also supports colors in the console via a pseudo terminal. Also inputing data is much more convinient now since there won't be any popups anymore instead you can use the pseudo terminal.

Pseudo Terminal

More details here.

Debugger

Enables you to set breakpoints, run code in a breakpoint context, jump to the next line of execution etc. Generally helpful if you want to debug your code. More details here.

Breakpoint

Keep in mind to set the breakpoint on a none empty line. Otherwise it will just skip that breakpoint.

Active breakpoint

A repl is also available while executing the script or having an active breakpoint.

REPL

API Browser

API Browser for GreyScript. Version of greyscript-meta in Visual Studio Code.

API Browser

Refresh

Will refresh the AST Cache which is used for diagnostics, hover tooltips and autocompletion.

Snippets

Will return a list of available GreyHack snippets. Such as ls, mkdir and more.

Snippets

Goto Error

Jumps to the next existing syntax error.

Supporting providers

Autocompletion Provider

Figures out the current context and tries to give suggestions accordingly.

Hover Tooltips Provider

Returns informations about functions/types.

Diagnostics Provider

Returns information about syntax errors in your code.

Symbol Provider

Returns list of all available symbol in active file.

Symbol

Definition Provider

Shows definitions in the currently active file and it's dependencies.

Definition

Colorpicker Provider

Shows colorpicker if you got color or mark tags.

Copyright

Sloth icons created by Freepik - Flaticon

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft