Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Related Resources

Online resources

External tools

  • Online Playground – Run Rhai scripts directly from an editor in the browser

  • Language Server – Experimental Language Server Protocol (LSP) server for Rhai

  • rhai-doc – Rhai script documentation tool

Syntax highlighting

  • VS Code Extension – Support .rhai script files syntax highlighting for Visual Studio Code.

  • JetBrains Plugin – Support .rhai script files syntax highlighting and more for JetBrains IDE’s.

  • Sublime Text 3 Plugin – Support .rhai script files syntax highlighting for Sublime Text 3.

  • Vim Plugin – Support .rhai script files syntax highlighting for Vim.

  • For other syntax highlighting purposes, e.g. highlight.js, both Rust or JavaScript can be used successfully.

    Use rust when there is no string interpolation. This way, closures and functions (via the fn keyword) are styled properly. Elements not highlighted include:

    Use js (JavaScript) when there is strings interpolation. Elements not highlighted include:

    • functions definition (via the fn keyword)
    • closures (via the Rust-like |...| { ... } syntax)
    • built-in functions such as Fn, call, type_of, is_shared, is_def_var, is_def_fn

Other cool projects