class LanguageServer::Protocol::Interface::DocumentHighlight
A document highlight is a range inside a text document which deserves special attention. Usually a document highlight is visualized by changing the background color of its range.
Attributes
attributes[R]
Public Class Methods
new(range:, kind: nil)
click to toggle source
# File lib/language_server/protocol/interface/document_highlight.rb, line 10 def initialize(range:, kind: nil) @attributes = {} @attributes[:range] = range @attributes[:kind] = kind if kind @attributes.freeze end
Public Instance Methods
kind()
click to toggle source
The highlight kind, default is DocumentHighlightKind.Text.
@return [DocumentHighlightKind]
# File lib/language_server/protocol/interface/document_highlight.rb, line 31 def kind attributes.fetch(:kind) end
range()
click to toggle source
The range this highlight applies to.
@return [Range]
# File lib/language_server/protocol/interface/document_highlight.rb, line 23 def range attributes.fetch(:range) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/document_highlight.rb, line 37 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/document_highlight.rb, line 41 def to_json(*args) to_hash.to_json(*args) end