Class: LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb
Overview
The publish diagnostic client capabilities.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#code_description_support ⇒ boolean | nil
Client supports a codeDescription property.
-
#data_support ⇒ boolean | nil
Whether code action supports the
dataproperty which is preserved between atextDocument/publishDiagnosticsandtextDocument/codeActionrequest. -
#initialize(related_information: nil, tag_support: nil, version_support: nil, code_description_support: nil, data_support: nil) ⇒ PublishDiagnosticsClientCapabilities
constructor
A new instance of PublishDiagnosticsClientCapabilities.
-
#related_information ⇒ boolean | nil
Whether the clients accepts diagnostics with related information.
-
#tag_support ⇒ { valueSet:DiagnosticTag[] } | nil
Client supports the tag property to provide meta data about a diagnostic.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#version_support ⇒ boolean | nil
Whether the client interprets the version property of the
textDocument/publishDiagnosticsnotification’s parameter.
Constructor Details
#initialize(related_information: nil, tag_support: nil, version_support: nil, code_description_support: nil, data_support: nil) ⇒ PublishDiagnosticsClientCapabilities
Returns a new instance of PublishDiagnosticsClientCapabilities.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 8 def initialize(related_information: nil, tag_support: nil, version_support: nil, code_description_support: nil, data_support: nil) @attributes = {} @attributes[:relatedInformation] = if @attributes[:tagSupport] = tag_support if tag_support @attributes[:versionSupport] = version_support if version_support @attributes[:codeDescriptionSupport] = code_description_support if code_description_support @attributes[:dataSupport] = data_support if data_support @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
72 73 74 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 72 def attributes @attributes end |
Instance Method Details
#code_description_support ⇒ boolean | nil
Client supports a codeDescription property
56 57 58 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 56 def code_description_support attributes.fetch(:codeDescriptionSupport) end |
#data_support ⇒ boolean | nil
Whether code action supports the data property which is preserved between a textDocument/publishDiagnostics and textDocument/codeAction request.
68 69 70 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 68 def data_support attributes.fetch(:dataSupport) end |
#related_information ⇒ boolean | nil
Whether the clients accepts diagnostics with related information.
24 25 26 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 24 def attributes.fetch(:relatedInformation) end |
#tag_support ⇒ { valueSet:DiagnosticTag[] } | nil
Client supports the tag property to provide meta data about a diagnostic. Clients supporting tags have to handle unknown tags gracefully.
35 36 37 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 35 def tag_support attributes.fetch(:tagSupport) end |
#to_hash ⇒ Object
74 75 76 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 74 def to_hash attributes end |
#to_json(*args) ⇒ Object
78 79 80 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 78 def to_json(*args) to_hash.to_json(*args) end |
#version_support ⇒ boolean | nil
Whether the client interprets the version property of the textDocument/publishDiagnostics notification’s parameter.
46 47 48 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 46 def version_support attributes.fetch(:versionSupport) end |