Class: LanguageServer::Protocol::Interface::InlayHintParams

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/inlay_hint_params.rb

Overview

A parameter literal used in inlay hint requests.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text_document:, range:, work_done_token: nil) ⇒ InlayHintParams

Returns a new instance of InlayHintParams.

Since:

  • 3.17.0



10
11
12
13
14
15
16
17
18
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 10

def initialize(text_document:, range:, work_done_token: nil)
  @attributes = {}

  @attributes[:textDocument] = text_document
  @attributes[:range] = range
  @attributes[:workDoneToken] = work_done_token if work_done_token

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.17.0



44
45
46
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 44

def attributes
  @attributes
end

Instance Method Details

#rangeRange

The document range for which inlay hints should be computed.

Returns:

Since:

  • 3.17.0



32
33
34
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 32

def range
  attributes.fetch(:range)
end

#text_documentTextDocumentIdentifier

The text document.

Returns:

Since:

  • 3.17.0



24
25
26
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 24

def text_document
  attributes.fetch(:textDocument)
end

#to_hashObject

Since:

  • 3.17.0



46
47
48
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 46

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



50
51
52
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 50

def to_json(*args)
  to_hash.to_json(*args)
end

#work_done_tokenProgressToken | nil

An optional token that a server can use to report work done progress.

Returns:

  • (ProgressToken | nil)

Since:

  • 3.17.0



40
41
42
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 40

def work_done_token
  attributes.fetch(:workDoneToken)
end