Skip to content

Extension providing ORB language support for Visual Studio code

License

Notifications You must be signed in to change notification settings

kuyio/vscode-orb

Repository files navigation

vscode-orb

VSCode extension providing extensive support for the Ruby ORB template language.

Example

Example

Features

This extension extends the HTML language mode with the following features:

  1. Highlighting of all ORB language tokens:
  • component tags
  • slot tags
  • expression attributes
  • named blocks
  • printing and control expressions
  • private comments
  1. Snippets for common ORB language constructs:
  • if generates a {#if ...} ... {/if} block
  • for generates a {#for item in items} ... {/for} block
  • c generates a public comment <!-- ... --> block
  • pc generates a private comment {!-- ... --} block
  • pe generates a printing expression {{ ... }}
  • npe generates a control expression {% ... %} block
  • slot generates a <Parent:slot>...</Parent:slot> block
  1. Registers itself as an htmlLanguageParticipant so all HTML LSP features are also available in ORB mode.

  2. Registers itself as the default highlighter for *.orb files

  3. Provides a new orb.cycleTags command to cycle through the different ORB tags

  • Cycles through {{ ... }}, {% ... %}, {!-- ... --} tags
  • Can be bound to a keybinding in the keybindings.json file
  • Supports multi-line and selection
  • Replaces ERB tags with ORB tags if there are any ERB tags surrounding the selection

Development

  1. Install the vsce tool: npm install -g @vscode/vsce
  2. Clone this repository
  3. Change to the extension directory and run vsce package
  4. Install the resulting vscode-orb-VERSION.vsix file from VSCode through Command Palette -> Extensions: Install from VSIX
  5. Reload your VSCode

About

Extension providing ORB language support for Visual Studio code

Resources

License

Stars

Watchers

Forks

Packages

No packages published