Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Ruby Templates: ERB, Haml, SlimNew to Visual Studio Code? Get it now.
Ruby Templates: ERB, Haml, Slim

Ruby Templates: ERB, Haml, Slim

x-ror

|
12 installs
| (0) | Free
Rails view tooling for ERB, Haml and Slim: highlighting, errors as you type, safe formatting, and Rails-aware go to partial, completion and hover for components, routes, ivars and i18n.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Ruby Templates

Ruby Templates: ERB, Haml, Slim

VS Marketplace Open VSX npm Socket build License: MIT

Rails view tooling for VS Code: one extension for ERB, Haml and Slim. It highlights your templates, finds errors as you type, formats them, and understands your Rails app: partials, components, helpers, routes, instance variables, translations and Stimulus controllers.

Built for Rails developers who work in app/views every day, and for teams that want the same template checks and formatting in the editor and in CI.

  • No gems to install. The checks and the formatter are a fast language server written in Rust and bundled with the extension. They follow Erubi, Rails, Haml 7 and Slim 5 and report errors with those projects' own messages.
  • Rails-aware. F12 on render "users/card" opens the partial; completion knows your partials, ViewComponents, model columns, *_path helpers, @ivars from the controller and t(".keys").
  • Safe formatting. It changes only whitespace and checks that the template still compiles to the same thing; if it is unsure, it leaves the file alone.
  • Works with Ruby LSP. Install both: Ruby LSP keeps your .rb files, this extension adds what templates need.

Getting started

  1. Install Ruby Templates from the VS Code Marketplace or Open VSX.
  2. Open a Rails project and any view. That's it: highlighting, checks, navigation and formatting work immediately.
  3. Optional: turn on format on save, e.g. "[erb]": { "editor.formatOnSave": true } (also [haml], [slim]).

Requires VS Code 1.100 or newer, on Linux (x64, arm64), macOS (Apple silicon, Intel) or Windows (x64).

Documentation

The full documentation is at x-ror.github.io/vscode-ruby-templates:

  • Getting started
  • Guides: errors as you type, Rails navigation and completion, file types, formatting, commands, command line for CI, settings, supported syntax, compatibility and troubleshooting
  • Diagnostics reference: every check, with its code
  • Rules and .ruby-templates.toml: turn checks off per project, folder or file; it wins over the VS Code settings
  • Changelog

Contributing covers building, testing and the project layout. Found a bug or missing a Rails feature? Open an issue.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft