language_server-protocol 3.15.0.0 → 3.15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9569616333bfa8cac560d8eb19e79c0078325e0c9805ad93b71e188f86df01ed
|
4
|
+
data.tar.gz: a610b33875a9ec242d72a19cdead030ab3125bc73c674f68c505217960dcb343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b514fafbc7e16989109d19e13d5a744e3e1560ef5214661642e963b4eb68a37694decba47cd61bbfd58d7a54056aa35778a0368a22710617d9ebc4ce3a206770
|
7
|
+
data.tar.gz: a975ab715b6bcc6474e2dac4f755117a77c465153e0abdc30d89a5d9053f5d6314871a0332a693a536767e31f22d1284f49d70ed8202071c95005c715978284c
|
@@ -162,6 +162,7 @@ module LanguageServer
|
|
162
162
|
autoload :SymbolInformation, "language_server/protocol/interface/symbol_information"
|
163
163
|
autoload :TextDocumentChangeRegistrationOptions, "language_server/protocol/interface/text_document_change_registration_options"
|
164
164
|
autoload :TextDocumentClientCapabilities, "language_server/protocol/interface/text_document_client_capabilities"
|
165
|
+
autoload :TextDocumentContentChangeEvent, "language_server/protocol/interface/text_document_content_change_event"
|
165
166
|
autoload :TextDocumentEdit, "language_server/protocol/interface/text_document_edit"
|
166
167
|
autoload :TextDocumentIdentifier, "language_server/protocol/interface/text_document_identifier"
|
167
168
|
autoload :TextDocumentItem, "language_server/protocol/interface/text_document_item"
|
@@ -358,6 +359,7 @@ module LanguageServer
|
|
358
359
|
require "language_server/protocol/interface/symbol_information"
|
359
360
|
require "language_server/protocol/interface/text_document_change_registration_options"
|
360
361
|
require "language_server/protocol/interface/text_document_client_capabilities"
|
362
|
+
require "language_server/protocol/interface/text_document_content_change_event"
|
361
363
|
require "language_server/protocol/interface/text_document_edit"
|
362
364
|
require "language_server/protocol/interface/text_document_identifier"
|
363
365
|
require "language_server/protocol/interface/text_document_item"
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# An event describing a change to a text document. If range and rangeLength are omitted
|
6
|
+
# the new text is considered to be the full content of the document.
|
7
|
+
#
|
8
|
+
class TextDocumentContentChangeEvent
|
9
|
+
def initialize(range: nil, range_length: nil, text:)
|
10
|
+
@attributes = {}
|
11
|
+
|
12
|
+
@attributes[:range] = range if range
|
13
|
+
@attributes[:rangeLength] = range_length if range_length
|
14
|
+
@attributes[:text] = text
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# The range of the document that changed.
|
21
|
+
#
|
22
|
+
# @return [Range, nil]
|
23
|
+
def range
|
24
|
+
attributes.fetch(:range)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# The optional length of the range that got replaced.
|
29
|
+
#
|
30
|
+
# @return [number, nil]
|
31
|
+
def range_length
|
32
|
+
attributes.fetch(:rangeLength)
|
33
|
+
end
|
34
|
+
|
35
|
+
#
|
36
|
+
# The new text for the provided range.
|
37
|
+
#
|
38
|
+
# --- OR ---
|
39
|
+
#
|
40
|
+
# The new text of the whole document.
|
41
|
+
#
|
42
|
+
# @return [string]
|
43
|
+
def text
|
44
|
+
attributes.fetch(:text)
|
45
|
+
end
|
46
|
+
|
47
|
+
attr_reader :attributes
|
48
|
+
|
49
|
+
def to_hash
|
50
|
+
attributes
|
51
|
+
end
|
52
|
+
|
53
|
+
def to_json(*args)
|
54
|
+
to_hash.to_json(*args)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: language_server-protocol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.15.0.
|
4
|
+
version: 3.15.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumiaki MATSUSHIMA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -302,6 +302,7 @@ files:
|
|
302
302
|
- lib/language_server/protocol/interface/symbol_information.rb
|
303
303
|
- lib/language_server/protocol/interface/text_document_change_registration_options.rb
|
304
304
|
- lib/language_server/protocol/interface/text_document_client_capabilities.rb
|
305
|
+
- lib/language_server/protocol/interface/text_document_content_change_event.rb
|
305
306
|
- lib/language_server/protocol/interface/text_document_edit.rb
|
306
307
|
- lib/language_server/protocol/interface/text_document_identifier.rb
|
307
308
|
- lib/language_server/protocol/interface/text_document_item.rb
|