Class: LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb,
sig/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rbs
Overview
Client workspace capabilities specific to inlay hints.
Instance Attribute Summary collapse
- #attributes ⇒ Hash[Symbol, untyped] readonly
Instance Method Summary collapse
-
#initialize(refresh_support: nil) ⇒ InlayHintWorkspaceClientCapabilities
constructor
A new instance of InlayHintWorkspaceClientCapabilities.
-
#refresh_support ⇒ boolean
Whether the client implementation supports a refresh request sent from the server to the client.
- #to_hash ⇒ Hash[Symbol, untyped]
- #to_json(*args) ⇒ String
Constructor Details
#initialize(refresh_support: nil) ⇒ InlayHintWorkspaceClientCapabilities
Returns a new instance of InlayHintWorkspaceClientCapabilities.
10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb', line 10 def initialize(refresh_support: nil) @attributes = {} @attributes[:refreshSupport] = refresh_support if refresh_support @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Hash[Symbol, untyped] (readonly)
32 33 34 |
# File 'lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb', line 32 def attributes @attributes end |
Instance Method Details
#refresh_support ⇒ boolean
Whether the client implementation supports a refresh request sent from the server to the client.
Note that this event is global and will force the client to refresh all inlay hints currently shown. It should be used with absolute care and is useful for situation where a server for example detects a project wide change that requires such a calculation.
28 29 30 |
# File 'lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb', line 28 def refresh_support attributes.fetch(:refreshSupport) end |
#to_hash ⇒ Hash[Symbol, untyped]
34 35 36 |
# File 'lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb', line 34 def to_hash attributes end |
#to_json(*args) ⇒ String
38 39 40 |
# File 'lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb', line 38 def to_json(*args) to_hash.to_json(*args) end |