Method: RubyLsp::Requests::InlayHints#initialize

Defined in:
lib/ruby_lsp/requests/inlay_hints.rb

#initialize(document, range, hints_configuration, dispatcher) ⇒ InlayHints

Returns a new instance of InlayHints.



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/ruby_lsp/requests/inlay_hints.rb', line 61

def initialize(document, range, hints_configuration, dispatcher)
  super()
  start_line = range.dig(:start, :line)
  end_line = range.dig(:end, :line)

  @response_builder = T.let(
    ResponseBuilders::CollectionResponseBuilder[Interface::InlayHint].new,
    ResponseBuilders::CollectionResponseBuilder[Interface::InlayHint],
  )
  Listeners::InlayHints.new(@response_builder, start_line..end_line, hints_configuration, dispatcher)
end