Rails Syntax Highlighting for Visual Studio Code
Extends Visual Studio Code's Ruby Language Grammars with Rails Library.
Syntax Identification for Rails Library using Rails API.
Example Syntax Highlighting
Before:
After:
"Special Methods" such as belongs_to
, has_many
, has_rich_text
, validates
, scope
, before_action
, link_to
are now identified.
There are certainly more known methods Rails provides. Added Methods from various classes/modules listed below.
Known Methods Added
AbstractController
AbstractController::Callbacks
ActionController
ActionController::Flash::ClassMethods
ActionController::Redirecting
ActionController::RequestForgeryProtection::ClassMethods
ActionDispatch
ActionDispatch::Routing::RouteSet::NamedRouteCollection < Object
Routing::Mapper::Base
Routing::Mapper::Concerns
Routing::Mapper::CustomUrls
Routing::Mapper::HttpHelpers
Routing::Mapper::Resources
Routing::Mapper::Scoping
ActionView
ActionView::Helpers::CacheHelper
ActionView::Helpers::TagHelper
ActionView::Helpers::TextHelper
ActionView::Helpers::TranslationHelper
ActionView::Helpers::UrlHelper
ActionText
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
Notes
This Extension is certainly not inclusive of every method Rails offers. Rails is a massive library!
Pull Requests are more than welcome!
References
Install via Visual Studio Code Extensions
Syntax Highlight Guide
Language Grammar Rules
Rails API
Ruby Syntax Highlighting
Logo © David Heinemeier Hansson: https://rubyonrails.org/trademarks/