Class: LSP::DocumentHighlight
Overview
export interface DocumentHighlight
/**
* The range this highlight applies to.
*/
range: Range;
/**
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
*/
kind?: DocumentHighlightKind;
Instance Attribute Summary collapse
-
#kind ⇒ Object
type: Range # type: DocumentHighlightKind.
-
#range ⇒ Object
type: Range # type: DocumentHighlightKind.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ DocumentHighlight
constructor
A new instance of DocumentHighlight.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ DocumentHighlight
Returns a new instance of DocumentHighlight.
1058 1059 1060 1061 |
# File 'lib/lsp/lsp_types.rb', line 1058 def initialize(initial_hash = nil) super @optional_method_names = i[kind] end |
Instance Attribute Details
#kind ⇒ Object
type: Range # type: DocumentHighlightKind
1056 1057 1058 |
# File 'lib/lsp/lsp_types.rb', line 1056 def kind @kind end |
#range ⇒ Object
type: Range # type: DocumentHighlightKind
1056 1057 1058 |
# File 'lib/lsp/lsp_types.rb', line 1056 def range @range end |
Instance Method Details
#from_h!(value) ⇒ Object
1063 1064 1065 1066 1067 1068 |
# File 'lib/lsp/lsp_types.rb', line 1063 def from_h!(value) value = {} if value.nil? self.range = Range.new(value['range']) unless value['range'].nil? self.kind = value['kind'] # Unknown type self end |