Module: RubyLsp::Refactor::CodeActionsExtension
- Defined in:
- lib/ruby_lsp/ruby_lsp_refactor/addon.rb
Overview
Prepended into RubyLsp::Requests::CodeActions#perform.
Runs our own AST walk and appends the resulting actions to whatever ruby-lsp itself returns. Each action carries a full ‘edit:` so no resolve round-trip is needed (the LSP spec allows this).
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
25 26 27 28 29 |
# File 'lib/ruby_lsp/ruby_lsp_refactor/addon.rb', line 25 def perform actions = super || [] actions.concat(RubyLsp::Refactor::Addon.refactor_actions_for(@document, @range)) actions end |