Class: LanguageServer::Protocol::Interface::CodeActionClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CodeActionClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/code_action_client_capabilities.rb,
sig/language_server/protocol/interface/code_action_client_capabilities.rbs
Overview
The Client Capabilities of a CodeActionRequest.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash[Symbol, untyped]
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#code_action_literal_support ⇒ { codeActionKind: { valueSet: CodeActionKind[]; }; }
The client support code action literals of type
CodeActionas a valid response of thetextDocument/codeActionrequest. -
#data_support ⇒ boolean
Whether code action supports the
dataproperty which is preserved between atextDocument/codeActionand acodeAction/resolverequest. -
#disabled_support ⇒ boolean
Whether code action supports the
disabledproperty. -
#dynamic_registration ⇒ boolean
Whether code action supports dynamic registration.
-
#honors_change_annotations ⇒ boolean
Whether the client honors the change annotations in text edits and resource operations returned via the
CodeAction#editproperty by for example presenting the workspace edit in the user interface and asking for confirmation. -
#initialize(dynamic_registration: nil, code_action_literal_support: nil, is_preferred_support: nil, disabled_support: nil, data_support: nil, resolve_support: nil, honors_change_annotations: nil) ⇒ CodeActionClientCapabilities
constructor
A new instance of CodeActionClientCapabilities.
-
#is_preferred_support ⇒ boolean
Whether code action supports the
isPreferredproperty. -
#resolve_support ⇒ { properties: string[]; }
Whether the client supports resolving additional code action properties via a separate
codeAction/resolverequest. - #to_hash ⇒ Hash[Symbol, untyped]
- #to_json(*args) ⇒ String
Constructor Details
#initialize(dynamic_registration: nil, code_action_literal_support: nil, is_preferred_support: nil, disabled_support: nil, data_support: nil, resolve_support: nil, honors_change_annotations: nil) ⇒ CodeActionClientCapabilities
Returns a new instance of CodeActionClientCapabilities.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 8 def initialize(dynamic_registration: nil, code_action_literal_support: nil, is_preferred_support: nil, disabled_support: nil, data_support: nil, resolve_support: nil, honors_change_annotations: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:codeActionLiteralSupport] = code_action_literal_support if code_action_literal_support @attributes[:isPreferredSupport] = is_preferred_support if is_preferred_support @attributes[:disabledSupport] = disabled_support if disabled_support @attributes[:dataSupport] = data_support if data_support @attributes[:resolveSupport] = resolve_support if resolve_support @attributes[:honorsChangeAnnotations] = honors_change_annotations if honors_change_annotations @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Hash[Symbol, untyped] (readonly)
Returns the value of attribute attributes.
99 100 101 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 99 def attributes @attributes end |
Instance Method Details
#code_action_literal_support ⇒ { codeActionKind: { valueSet: CodeActionKind[]; }; }
The client support code action literals of type CodeAction as a valid
response of the textDocument/codeAction request. If the property is not
set the request can only return Command literals.
38 39 40 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 38 def code_action_literal_support attributes.fetch(:codeActionLiteralSupport) end |
#data_support ⇒ boolean
Whether code action supports the data property which is
preserved between a textDocument/codeAction and a
codeAction/resolve request.
70 71 72 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 70 def data_support attributes.fetch(:dataSupport) end |
#disabled_support ⇒ boolean
Whether code action supports the disabled property.
58 59 60 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 58 def disabled_support attributes.fetch(:disabledSupport) end |
#dynamic_registration ⇒ boolean
Whether code action supports dynamic registration.
26 27 28 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 26 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#honors_change_annotations ⇒ boolean
Whether the client honors the change annotations in
text edits and resource operations returned via the
CodeAction#edit property by for example presenting
the workspace edit in the user interface and asking
for confirmation.
95 96 97 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 95 def honors_change_annotations attributes.fetch(:honorsChangeAnnotations) end |
#is_preferred_support ⇒ boolean
Whether code action supports the isPreferred property.
48 49 50 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 48 def is_preferred_support attributes.fetch(:isPreferredSupport) end |
#resolve_support ⇒ { properties: string[]; }
Whether the client supports resolving additional code action
properties via a separate codeAction/resolve request.
81 82 83 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 81 def resolve_support attributes.fetch(:resolveSupport) end |
#to_hash ⇒ Hash[Symbol, untyped]
101 102 103 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 101 def to_hash attributes end |
#to_json(*args) ⇒ String
105 106 107 |
# File 'lib/language_server/protocol/interface/code_action_client_capabilities.rb', line 105 def to_json(*args) to_hash.to_json(*args) end |