Class: LSP::WorkspaceEditClientCapabilities

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

Overview

export interface WorkspaceEditClientCapabilities { /** * The client supports versioned document changes in WorkspaceEdits / documentChanges?: boolean; /* * The resource operations the client supports. Clients should at least * support 'create', 'rename' and 'delete' files and folders. * * @since 3.13.0 / resourceOperations?: ResourceOperationKind; /* * The failure handling strategy of a client if applying the workspace edit * fails. * * @since 3.13.0 */ failureHandling?: FailureHandlingKind; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ WorkspaceEditClientCapabilities

Returns a new instance of WorkspaceEditClientCapabilities.



2704
2705
2706
2707
# File 'lib/lsp/lsp_protocol.rb', line 2704

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[documentChanges resourceOperations failureHandling]
end

Instance Attribute Details

#documentChangesObject

type: boolean # type: ResourceOperationKind # type: FailureHandlingKind



2702
2703
2704
# File 'lib/lsp/lsp_protocol.rb', line 2702

def documentChanges
  @documentChanges
end

#failureHandlingObject

type: boolean # type: ResourceOperationKind # type: FailureHandlingKind



2702
2703
2704
# File 'lib/lsp/lsp_protocol.rb', line 2702

def failureHandling
  @failureHandling
end

#resourceOperationsObject

type: boolean # type: ResourceOperationKind # type: FailureHandlingKind



2702
2703
2704
# File 'lib/lsp/lsp_protocol.rb', line 2702

def resourceOperations
  @resourceOperations
end

Instance Method Details

#from_h!(value) ⇒ Object



2709
2710
2711
2712
2713
2714
2715
# File 'lib/lsp/lsp_protocol.rb', line 2709

def from_h!(value)
  value = {} if value.nil?
  self.documentChanges = value['documentChanges'] # Unknown type
  self.resourceOperations = value['resourceOperations'].map { |val| val } unless value['resourceOperations'].nil? # Unknown array type
  self.failureHandling = value['failureHandling'] # Unknown type
  self
end