Empowering Developers with HTML-Aware ERB Tooling
summary
A new toolchain named Herp parses ERB files as HTML-aware syntax trees, implemented as a handwritten C99 parser with Ruby and JS bindings, preserving exact source locations and representing ERB control-flow (if/case/loop) as nested nodes. It ships a parser plus upcoming formatter and linter, offers a browser playground, and enables LSP integrations (Stimulus/Turbo/Ruby LSP), view-helper extraction, and multi-file diagnostics so editors can provide accurate autocompletion, diagnostics, and safe interpolation checks.
AI-written summary · about
chapters (25)
- 0:00Introduction and background
- 1:13History of Ruby tooling
- 3:43Stimulus and Turbo LSPs
- 5:25Need for HTML-aware ERB tooling
- 6:51Goals for ERB support
- 7:33Challenges with ERB parsing
- 9:17Why a custom parser was needed
- 10:22Introducing Herb parser
- 11:30Herb parser features
- 13:16Herb parser usage and bindings
- 13:59Parsing HTML in ERB files
- 14:41Handling partial HTML elements
- 16:10Parsing ERB control flow
- 17:33Nested HTML in ERB constructs
- 18:37Supported ERB constructs
- 19:00Herb's first public release
- 19:21Interactive browser playground
- 20:26Herb formatter plans
- 21:28Herb linter capabilities
- 22:30Vision for Reaction View
- 24:21Extending to other templating engines
- 25:44Short-term future of Herb
- 27:10Multi-file analysis and diagnostics
- 27:52Impact on Ruby tooling ecosystem
- 28:55Conclusion and call to action
related talks
32mHTML-Aware ERB: The Path to Reactive Rendering
30mHerb to ReActionView
31mThe Anatomy of an ERB Rendering Engine
37mKeynote: Herb to ReActionView: A New Foundation for the View Layer
34mThe Modern View Layer Rails Deserves: A Vision for 2025 and Beyond
47mTemplate Engines in Ruby
06mLightning Talk – Chris Hagmann
29mHTMLBars: The Next-Generation of Templating in Ember.js
