RuboCop: LSP and Prism
summary
Built-in LSP runs a daemon via rubocop--lsp so editors get real‑time diagnostics and formatting without RuboCop’s slow startup and the CLI remains for heavy autocorrect. RuboCop adds AutoCorrect:contextual (values always disabled contextual) to skip aggressive fixes while typing. Parser backend can switch to ParserEngine: parser_prism with gem 'prism', supporting Ruby 3.3+ and error tolerance (MissingNode) and yielding about 4× faster parsing via translation (raw Prism bench shows ~33×), while RuboCop maintains ~580 cops to keep working.
AI-written summary · about
chapters (10)
- 0:00Introduction and background
- 2:09What is LSP and its role
- 5:28RuboCop's LSP implementation
- 10:34Auto-correct context challenges
- 12:44Introducing Prism for RuboCop
- 15:34Prism integration details
- 18:01Performance gains with Prism
- 19:51Error tolerance with Prism
- 22:15Future of parsers and RuboCop
- 24:45Closing remarks and thanks








