Class: LSP::DocumentOnTypeFormattingRegistrationOptions

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

Overview

export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions { }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ DocumentOnTypeFormattingRegistrationOptions

Returns a new instance of DocumentOnTypeFormattingRegistrationOptions.



2454
2455
2456
2457
# File 'lib/lsp/lsp_protocol.rb', line 2454

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

Instance Attribute Details

#documentSelectorObject

type: DocumentSelector | null # type: string # type: string[]



2452
2453
2454
# File 'lib/lsp/lsp_protocol.rb', line 2452

def documentSelector
  @documentSelector
end

#firstTriggerCharacterObject

type: DocumentSelector | null # type: string # type: string[]



2452
2453
2454
# File 'lib/lsp/lsp_protocol.rb', line 2452

def firstTriggerCharacter
  @firstTriggerCharacter
end

#moreTriggerCharacterObject

type: DocumentSelector | null # type: string # type: string[]



2452
2453
2454
# File 'lib/lsp/lsp_protocol.rb', line 2452

def moreTriggerCharacter
  @moreTriggerCharacter
end

Instance Method Details

#from_h!(value) ⇒ Object



2459
2460
2461
2462
2463
2464
2465
# File 'lib/lsp/lsp_protocol.rb', line 2459

def from_h!(value)
  value = {} if value.nil?
  self.documentSelector = value['documentSelector'] # Unknown type
  self.firstTriggerCharacter = value['firstTriggerCharacter']
  self.moreTriggerCharacter = value['moreTriggerCharacter'].map { |val| val } unless value['moreTriggerCharacter'].nil?
  self
end