Class: LanguageServer::Protocol::Interface::CompletionClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CompletionClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/completion_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#completion_item ⇒ { snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }
The client supports the following ‘CompletionItem` specific capabilities.
- #completion_item_kind ⇒ { valueSet?: CompletionItemKind[]; }
-
#completion_list ⇒ { itemDefaults?: string[]; }
The client supports the following ‘CompletionList` specific capabilities.
-
#context_support ⇒ boolean
The client supports to send additional context information for a ‘textDocument/completion` request.
-
#dynamic_registration ⇒ boolean
Whether completion supports dynamic registration.
-
#initialize(dynamic_registration: nil, completion_item: nil, completion_item_kind: nil, context_support: nil, insert_text_mode: nil, completion_list: nil) ⇒ CompletionClientCapabilities
constructor
A new instance of CompletionClientCapabilities.
-
#insert_text_mode ⇒ InsertTextMode
The client’s default when the completion item doesn’t provide a ‘insertTextMode` property.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(dynamic_registration: nil, completion_item: nil, completion_item_kind: nil, context_support: nil, insert_text_mode: nil, completion_list: nil) ⇒ CompletionClientCapabilities
Returns a new instance of CompletionClientCapabilities.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 5 def initialize(dynamic_registration: nil, completion_item: nil, completion_item_kind: nil, context_support: nil, insert_text_mode: nil, completion_list: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:completionItem] = completion_item if completion_item @attributes[:completionItemKind] = completion_item_kind if completion_item_kind @attributes[:contextSupport] = context_support if context_support @attributes[:insertTextMode] = insert_text_mode if insert_text_mode @attributes[:completionList] = completion_list if completion_list @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
67 68 69 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 67 def attributes @attributes end |
Instance Method Details
#completion_item ⇒ { snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }
The client supports the following ‘CompletionItem` specific capabilities.
31 32 33 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 31 def completion_item attributes.fetch(:completionItem) end |
#completion_item_kind ⇒ { valueSet?: CompletionItemKind[]; }
36 37 38 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 36 def completion_item_kind attributes.fetch(:completionItemKind) end |
#completion_list ⇒ { itemDefaults?: string[]; }
The client supports the following ‘CompletionList` specific capabilities.
63 64 65 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 63 def completion_list attributes.fetch(:completionList) end |
#context_support ⇒ boolean
The client supports to send additional context information for a ‘textDocument/completion` request.
45 46 47 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 45 def context_support attributes.fetch(:contextSupport) end |
#dynamic_registration ⇒ boolean
Whether completion supports dynamic registration.
22 23 24 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 22 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#insert_text_mode ⇒ InsertTextMode
The client’s default when the completion item doesn’t provide a ‘insertTextMode` property.
54 55 56 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 54 def insert_text_mode attributes.fetch(:insertTextMode) end |
#to_hash ⇒ Object
69 70 71 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 69 def to_hash attributes end |
#to_json(*args) ⇒ Object
73 74 75 |
# File 'lib/language_server/protocol/interface/completion_client_capabilities.rb', line 73 def to_json(*args) to_hash.to_json(*args) end |