Class: LSP::TextDocumentSyncOptions

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

Overview

export interface TextDocumentSyncOptions

/**
 * Open and close notifications are sent to the server. If omitted open close notification should not
 * be sent.
 */
openClose?: boolean;
/**
 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
 */
change?: TextDocumentSyncKind;
/**
 * If present will save notifications are sent to the server. If omitted the notification should not be
 * sent.
 */
willSave?: boolean;
/**
 * If present will save wait until requests are sent to the server. If omitted the request should not be
 * sent.
 */
willSaveWaitUntil?: boolean;
/**
 * If present save notifications are sent to the server. If omitted the notification should not be
 * sent.
 */
save?: SaveOptions;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ TextDocumentSyncOptions

Returns a new instance of TextDocumentSyncOptions.



525
526
527
528
# File 'lib/lsp/lsp_protocol.rb', line 525

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[openClose change willSave willSaveWaitUntil save]
end

Instance Attribute Details

#changeObject

type: boolean # type: TextDocumentSyncKind # type: boolean # type: boolean # type: SaveOptions



523
524
525
# File 'lib/lsp/lsp_protocol.rb', line 523

def change
  @change
end

#openCloseObject

type: boolean # type: TextDocumentSyncKind # type: boolean # type: boolean # type: SaveOptions



523
524
525
# File 'lib/lsp/lsp_protocol.rb', line 523

def openClose
  @openClose
end

#saveObject

type: boolean # type: TextDocumentSyncKind # type: boolean # type: boolean # type: SaveOptions



523
524
525
# File 'lib/lsp/lsp_protocol.rb', line 523

def save
  @save
end

#willSaveObject

type: boolean # type: TextDocumentSyncKind # type: boolean # type: boolean # type: SaveOptions



523
524
525
# File 'lib/lsp/lsp_protocol.rb', line 523

def willSave
  @willSave
end

#willSaveWaitUntilObject

type: boolean # type: TextDocumentSyncKind # type: boolean # type: boolean # type: SaveOptions



523
524
525
# File 'lib/lsp/lsp_protocol.rb', line 523

def willSaveWaitUntil
  @willSaveWaitUntil
end

Instance Method Details

#from_h!(value) ⇒ Object



530
531
532
533
534
535
536
537
538
# File 'lib/lsp/lsp_protocol.rb', line 530

def from_h!(value)
  value = {} if value.nil?
  self.openClose = value['openClose'] # Unknown type
  self.change = value['change'] # Unknown type
  self.willSave = value['willSave'] # Unknown type
  self.willSaveWaitUntil = value['willSaveWaitUntil'] # Unknown type
  self.save = SaveOptions.new(value['save']) unless value['save'].nil?
  self
end