class LanguageServer::Protocol::Interface::TextDocumentSyncOptions

Attributes

attributes[R]

Public Class Methods

new(open_close: nil, change: nil, will_save: nil, will_save_wait_until: nil, save: nil) click to toggle source
# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 5
def initialize(open_close: nil, change: nil, will_save: nil, will_save_wait_until: nil, save: nil)
  @attributes = {}

  @attributes[:openClose] = open_close if open_close
  @attributes[:change] = change if change
  @attributes[:willSave] = will_save if will_save
  @attributes[:willSaveWaitUntil] = will_save_wait_until if will_save_wait_until
  @attributes[:save] = save if save

  @attributes.freeze
end

Public Instance Methods

change() click to toggle source

Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.

@return [TextDocumentSyncKind]

# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 35
def change
  attributes.fetch(:change)
end
open_close() click to toggle source

Open and close notifications are sent to the server. If omitted open close notifications should not be sent. Open and close notifications are sent to the server. If omitted open close notification should not be sent.

@return [boolean]

# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 24
def open_close
  attributes.fetch(:openClose)
end
save() click to toggle source

If present save notifications are sent to the server. If omitted the notification should not be sent.

@return [boolean | SaveOptions]

# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 62
def save
  attributes.fetch(:save)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 68
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 72
def to_json(*args)
  to_hash.to_json(*args)
end
will_save() click to toggle source

If present will save notifications are sent to the server. If omitted the notification should not be sent.

@return [boolean]

# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 44
def will_save
  attributes.fetch(:willSave)
end
will_save_wait_until() click to toggle source

If present will save wait until requests are sent to the server. If omitted the request should not be sent.

@return [boolean]

# File lib/language_server/protocol/interface/text_document_sync_options.rb, line 53
def will_save_wait_until
  attributes.fetch(:willSaveWaitUntil)
end