Class: LSP::ColorPresentationParams

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol_colorprovider.rb

Overview

export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams

/**
 * The text document.
 */
textDocument: TextDocumentIdentifier;
/**
 * The color to request presentations for.
 */
color: Color;
/**
 * The range where the color would be inserted. Serves as a context.
 */
range: Range;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from LSP::LSPBase

Instance Attribute Details

#colorObject

type: TextDocumentIdentifier # type: Color # type: Range



85
86
87
# File 'lib/lsp/lsp_protocol_colorprovider.rb', line 85

def color
  @color
end

#rangeObject

type: TextDocumentIdentifier # type: Color # type: Range



85
86
87
# File 'lib/lsp/lsp_protocol_colorprovider.rb', line 85

def range
  @range
end

#textDocumentObject

type: TextDocumentIdentifier # type: Color # type: Range



85
86
87
# File 'lib/lsp/lsp_protocol_colorprovider.rb', line 85

def textDocument
  @textDocument
end

Instance Method Details

#from_h!(value) ⇒ Object



87
88
89
90
91
92
93
# File 'lib/lsp/lsp_protocol_colorprovider.rb', line 87

def from_h!(value)
  value = {} if value.nil?
  self.textDocument = value['textDocument'] # Unknown type
  self.color = value['color'] # Unknown type
  self.range = value['range'] # Unknown type
  self
end