Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Rails Syntax HighlightingNew to Visual Studio Code? Get it now.
Rails Syntax Highlighting

Rails Syntax Highlighting

Sarah Ridge

|
5,480 installs
| (2) | Free
Extends Ruby Language Grammar with Rails Library
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Rails Syntax Highlighting for Visual Studio Code

Open VSX Version Open VSX Downloads GitHub License

Extends Visual Studio Code's Ruby Language Grammars with the Rails Library.

Support methods are identified such as:

  • belongs_to
  • has_many
  • has_rich_text
  • validates
  • scope
  • before_action
  • link_to

This extension is certainly not inclusive of every method Rails and Turbo Rails offers. Rails is a massive library! Added methods from various classes/modules listed below.

Pull Requests are more than welcome!

Install

This extension is available at the following extension marketplaces:

  • Visual Studio Code Marketplace
  • Open VSX Registry

Run one of the following commands depending on the editor you are using:

  • For vscode: code --install-extension SarahRidge.vscode-rails-syntax
  • For cursor: cursor --install-extension SarahRidge.vscode-rails-syntax

Reload your editor

Known Methods Added From

AbstractController

  • AbstractController::Callbacks

ActionController

  • ActionController::Flash::ClassMethods
  • ActionController::Redirecting
  • ActionController::RequestForgeryProtection::ClassMethods

ActionDispatch

  • Routing::Mapper::Base
  • Routing::Mapper::Concerns
  • Routing::Mapper::CustomUrls
  • Routing::Mapper::HttpHelpers
  • Routing::Mapper::Resources
  • Routing::Mapper::Scoping

ActionView

  • ActionView::Helpers::CacheHelper
  • ActionView::Helpers::FormTagHelper
  • ActionView::Helpers::TagHelper
  • ActionView::Helpers::TextHelper
  • ActionView::Helpers::TranslationHelper
  • ActionView::Helpers::UrlHelper

ActionText

  • ActionText::Attribute

ActiveModel

  • ActiveModel::Validations::ClassMethods

ActiveRecord

  • ActiveRecord::Associations::ClassMethods
  • ActiveRecord::Callbacks
  • ActiveRecord::Enum
  • ActiveRecord::Migration < Object
  • ActiveRecord::NestedAttributes::ClassMethods
  • ActiveRecord::QueryMethods
  • ActiveRecord::Relation < Object
  • ActiveRecord::Scoping::Named::ClassMethods

ActiveStorage

  • ActiveStorage::Attached::Model

ActiveSupport

  • ActiveSupport::Rescuable::ClassMethods

Module

  • Module < Object

Turbo Rails

  • Turbo::FramesHelper
  • Turbo::Streams::ActionHelper
  • Turbo::Streams::TagBuilder
  • Turbo::StreamsHelper

References

  • Syntax Highlight Guide
  • Language Grammar Rules
  • Rails API
  • Turbo Rails API

Related Extensions

  • Ruby Syntax Highlighting

Publish (internal)

Note: Publishing a new version of this theme is only meant for maintainers.

  • npx vsce package
  • Publish to VSCode Marketplace: npx vsce publish
  • Publish to Open VSX Registry: npx ovsx publish <.vsix file> -p <OpenVSX PAT>

Contributors


Logo © David Heinemeier Hansson: https://rubyonrails.org/trademarks/

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