Class: LSP::CodeActionOptions

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

Overview

export interface CodeActionOptions extends WorkDoneProgressOptions

/**
 * CodeActionKinds that this server may return.
 *
 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
 * may list out every specific kind they provide.
 */
codeActionKinds?: CodeActionKind[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ CodeActionOptions

Returns a new instance of CodeActionOptions.



1882
1883
1884
1885
# File 'lib/lsp/lsp_protocol.rb', line 1882

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

Instance Attribute Details

#codeActionKindsObject

type: CodeActionKind[] # type: boolean



1880
1881
1882
# File 'lib/lsp/lsp_protocol.rb', line 1880

def codeActionKinds
  @codeActionKinds
end

#workDoneProgressObject

type: CodeActionKind[] # type: boolean



1880
1881
1882
# File 'lib/lsp/lsp_protocol.rb', line 1880

def workDoneProgress
  @workDoneProgress
end

Instance Method Details

#from_h!(value) ⇒ Object



1887
1888
1889
1890
1891
1892
# File 'lib/lsp/lsp_protocol.rb', line 1887

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