class LanguageServer::Protocol::Interface::ShowDocumentParams
Params to show a document.
Attributes
attributes[R]
Public Class Methods
new(uri:, external: nil, take_focus: nil, selection: nil)
click to toggle source
# File lib/language_server/protocol/interface/show_document_params.rb, line 8 def initialize(uri:, external: nil, take_focus: nil, selection: nil) @attributes = {} @attributes[:uri] = uri @attributes[:external] = external if external @attributes[:takeFocus] = take_focus if take_focus @attributes[:selection] = selection if selection @attributes.freeze end
Public Instance Methods
external()
click to toggle source
Indicates to show the resource in an external program. To show for example `code.visualstudio.com/` in the default WEB browser set `external` to `true`.
@return [boolean]
# File lib/language_server/protocol/interface/show_document_params.rb, line 33 def external attributes.fetch(:external) end
selection()
click to toggle source
An optional selection range if the document is a text document. Clients might ignore the property if an external program is started or the file is not a text file.
@return [Range]
# File lib/language_server/protocol/interface/show_document_params.rb, line 55 def selection attributes.fetch(:selection) end
take_focus()
click to toggle source
An optional property to indicate whether the editor showing the document should take focus or not. Clients might ignore this property if an external program is started.
@return [boolean]
# File lib/language_server/protocol/interface/show_document_params.rb, line 44 def take_focus attributes.fetch(:takeFocus) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/show_document_params.rb, line 61 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/show_document_params.rb, line 65 def to_json(*args) to_hash.to_json(*args) end
uri()
click to toggle source
The document uri to show.
@return [string]
# File lib/language_server/protocol/interface/show_document_params.rb, line 23 def uri attributes.fetch(:uri) end