Class: LSP::DocumentFormattingParams

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

Overview

export interface DocumentFormattingParams extends WorkDoneProgressParams

/**
 * The document to format.
 */
textDocument: TextDocumentIdentifier;
/**
 * 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) ⇒ DocumentFormattingParams

Returns a new instance of DocumentFormattingParams.



2234
2235
2236
2237
# File 'lib/lsp/lsp_protocol.rb', line 2234

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

Instance Attribute Details

#optionsObject

type: TextDocumentIdentifier # type: FormattingOptions # type: ProgressToken



2232
2233
2234
# File 'lib/lsp/lsp_protocol.rb', line 2232

def options
  @options
end

#textDocumentObject

type: TextDocumentIdentifier # type: FormattingOptions # type: ProgressToken



2232
2233
2234
# File 'lib/lsp/lsp_protocol.rb', line 2232

def textDocument
  @textDocument
end

#workDoneTokenObject

type: TextDocumentIdentifier # type: FormattingOptions # type: ProgressToken



2232
2233
2234
# File 'lib/lsp/lsp_protocol.rb', line 2232

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



2239
2240
2241
2242
2243
2244
2245
# File 'lib/lsp/lsp_protocol.rb', line 2239

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