Class: LSP::TextDocumentSyncClientCapabilities

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

Overview

export interface TextDocumentSyncClientCapabilities

/**
 * Whether text document synchronization supports dynamic registration.
 */
dynamicRegistration?: boolean;
/**
 * The client supports sending will save notifications.
 */
willSave?: boolean;
/**
 * The client supports sending a will save request and
 * waits for a response providing text edits which will
 * be applied to the document before it is saved.
 */
willSaveWaitUntil?: boolean;
/**
 * The client supports did save notifications.
 */
didSave?: boolean;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ TextDocumentSyncClientCapabilities

Returns a new instance of TextDocumentSyncClientCapabilities.



480
481
482
483
# File 'lib/lsp/lsp_protocol.rb', line 480

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[dynamicRegistration willSave willSaveWaitUntil didSave]
end

Instance Attribute Details

#didSaveObject

type: boolean # type: boolean # type: boolean # type: boolean



478
479
480
# File 'lib/lsp/lsp_protocol.rb', line 478

def didSave
  @didSave
end

#dynamicRegistrationObject

type: boolean # type: boolean # type: boolean # type: boolean



478
479
480
# File 'lib/lsp/lsp_protocol.rb', line 478

def dynamicRegistration
  @dynamicRegistration
end

#willSaveObject

type: boolean # type: boolean # type: boolean # type: boolean



478
479
480
# File 'lib/lsp/lsp_protocol.rb', line 478

def willSave
  @willSave
end

#willSaveWaitUntilObject

type: boolean # type: boolean # type: boolean # type: boolean



478
479
480
# File 'lib/lsp/lsp_protocol.rb', line 478

def willSaveWaitUntil
  @willSaveWaitUntil
end

Instance Method Details

#from_h!(value) ⇒ Object



485
486
487
488
489
490
491
492
# File 'lib/lsp/lsp_protocol.rb', line 485

def from_h!(value)
  value = {} if value.nil?
  self.dynamicRegistration = value['dynamicRegistration'] # Unknown type
  self.willSave = value['willSave'] # Unknown type
  self.willSaveWaitUntil = value['willSaveWaitUntil'] # Unknown type
  self.didSave = value['didSave'] # Unknown type
  self
end