Class: LSP::CodeActionClientCapabilities

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

Overview

export interface CodeActionClientCapabilities { /** * Whether code action supports dynamic registration. / dynamicRegistration?: boolean; /* * The client support code action literals as a valid * response of the textDocument/codeAction request. * * @since 3.8.0 / codeActionLiteralSupport?: { /* * The code action kind is support with the following value * set. / codeActionKind: { /* * The code action kind values the client supports. When this * property exists the client also guarantees that it will * handle values outside its set gracefully and falls back * to a default value when unknown. / valueSet: CodeActionKind; }; }; /* * Whether code action supports the isPreferred property. * @since 3.15.0 */ isPreferredSupport?: boolean; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ CodeActionClientCapabilities

Returns a new instance of CodeActionClientCapabilities.



1823
1824
1825
1826
# File 'lib/lsp/lsp_protocol.rb', line 1823

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[dynamicRegistration codeActionLiteralSupport isPreferredSupport]
end

Instance Attribute Details

#codeActionLiteralSupportObject

type: boolean # type: {



1806
1807
1808
# File 'lib/lsp/lsp_protocol.rb', line 1806

def codeActionLiteralSupport
  @codeActionLiteralSupport
end

#dynamicRegistrationObject

type: boolean # type: {



1806
1807
1808
# File 'lib/lsp/lsp_protocol.rb', line 1806

def dynamicRegistration
  @dynamicRegistration
end

#isPreferredSupportObject

/** * The code action kind is support with the following value * set. / codeActionKind: { /* * The code action kind values the client supports. When this * property exists the client also guarantees that it will * handle values outside its set gracefully and falls back * to a default value when unknown. */ valueSet: CodeActionKind; }; }



1821
1822
1823
# File 'lib/lsp/lsp_protocol.rb', line 1821

def isPreferredSupport
  @isPreferredSupport
end

Instance Method Details

#from_h!(value) ⇒ Object



1828
1829
1830
1831
1832
1833
1834
# File 'lib/lsp/lsp_protocol.rb', line 1828

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