class RubyLsp::Requests::DocumentHighlight

“‘
end
FOO # should be highlighted as “read”
def foo
FOO = 1 # should be highlighted as “write”
“`ruby
# Example
This is achieved by sending different “kind” attributes to the editor (2 for read and 3 for write).
For writable elements like constants or variables, their read/write occurrences should be highlighted differently.
and highlight them.
the cursor is on the `F` of the constant `FOO`, the editor should identify other occurrences of `FOO`
informs the editor all relevant elements of the currently pointed item for highlighting. For example, when
The [document highlight](microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight)
![Document highlight demo](../../document_highlight.gif)

def initialize(document, position, dispatcher)

def initialize(document, position, dispatcher)
  super()
  target, parent = document.locate_node(position)
  @response_builder = T.let(
    ResponseBuilders::CollectionResponseBuilder[Interface::DocumentHighlight].new,
    ResponseBuilders::CollectionResponseBuilder[Interface::DocumentHighlight],
  )
  Listeners::DocumentHighlight.new(@response_builder, target, parent, dispatcher)
end

def perform

def perform
  @response_builder.response
end