Skip to content

Repository files navigation

Rhai Language Support for Visual Studio Code

License Installs Latest release

Rhai logo

Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way to add scripting to any application.

Features

  • Syntax highlighting
  • Grain bytecode compile
    • Compile on Save
    • Nested Grain bytecode file under Rhai files
    • Showing compilation Errors

Todo List

  • Auto formatter
  • Language server

How to Install

Commands

Use Ctrl + Shift + P or Command + Shift + P to open the command palette and type Rhai:.

Command description
rhai.compileGrain Compile Rhai current file to Grain bytecode
rhai.format Rhai: Format File
rhai.syntaxCheckRhai Rhai: Syntax check on current Rhai file

Settings

Use the Settings panel or settings.json in Visual Studio Code or command + , (Windows / Linux: File -> Preferences -> User Settings) open the vscode file settings.json

type default description
rhai.compileGrainOnSave string off Compile Rhai files to Grain bytecode on save
rhai.promptFileNesting boolean true Prompt to ask if the Rhai file nesting should be enabled, so compiled .rgrn files can nest under their .rhai source.
rhai.trace.server string off Traces the communication between VS Code and the language server.
rhai.syntaxCheckRhaiOnChange string off Enable syntax check on Rhai file on file change.
rhai.syntaxCheckRhaiDelaySeconds number 3 Seconds to wait after typing stops before running syntax check.
rhai.useLanguageServer boolean true Use Rhai Language Server. (WIP)

Screenshot

Sample

Releases

Packages

Contributors

Languages

Generated from oovm/RustTemplate