Class: LSP::DocumentRangeFormattingParams

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

Overview

export interface DocumentRangeFormattingParams extends WorkDoneProgressParams

/**
 * The document to format.
 */
textDocument: TextDocumentIdentifier;
/**
 * The range to format
 */
range: Range;
/**
 * The format options
 */
options: FormattingOptions;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ DocumentRangeFormattingParams

Returns a new instance of DocumentRangeFormattingParams.



2321
2322
2323
2324
# File 'lib/lsp/lsp_protocol.rb', line 2321

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[workDoneToken]
end

Instance Attribute Details

#optionsObject

type: TextDocumentIdentifier # type: Range # type: FormattingOptions # type: ProgressToken



2319
2320
2321
# File 'lib/lsp/lsp_protocol.rb', line 2319

def options
  @options
end

#rangeObject

type: TextDocumentIdentifier # type: Range # type: FormattingOptions # type: ProgressToken



2319
2320
2321
# File 'lib/lsp/lsp_protocol.rb', line 2319

def range
  @range
end

#textDocumentObject

type: TextDocumentIdentifier # type: Range # type: FormattingOptions # type: ProgressToken



2319
2320
2321
# File 'lib/lsp/lsp_protocol.rb', line 2319

def textDocument
  @textDocument
end

#workDoneTokenObject

type: TextDocumentIdentifier # type: Range # type: FormattingOptions # type: ProgressToken



2319
2320
2321
# File 'lib/lsp/lsp_protocol.rb', line 2319

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



2326
2327
2328
2329
2330
2331
2332
2333
# File 'lib/lsp/lsp_protocol.rb', line 2326

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