class LanguageServer::Protocol::Interface::CompletionContext
Contains additional information about the context in which a completion request is triggered.
Attributes
attributes[R]
Public Class Methods
new(trigger_kind:, trigger_character: nil)
click to toggle source
# File lib/language_server/protocol/interface/completion_context.rb, line 9 def initialize(trigger_kind:, trigger_character: nil) @attributes = {} @attributes[:triggerKind] = trigger_kind @attributes[:triggerCharacter] = trigger_character if trigger_character @attributes.freeze end
Public Instance Methods
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/completion_context.rb, line 38 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/completion_context.rb, line 42 def to_json(*args) to_hash.to_json(*args) end
trigger_character()
click to toggle source
The trigger character (a single character) that has trigger code complete. Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
@return [string]
# File lib/language_server/protocol/interface/completion_context.rb, line 32 def trigger_character attributes.fetch(:triggerCharacter) end
trigger_kind()
click to toggle source
How the completion was triggered.
@return [CompletionTriggerKind]
# File lib/language_server/protocol/interface/completion_context.rb, line 22 def trigger_kind attributes.fetch(:triggerKind) end