lsp-protocol 0.0.6 → 0.0.7
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 +4 -4
- data/lib/lsp.rb +11 -11
- data/lsp-protocol.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af28738c1b81b36f8e88e47c4706766819475a6c454e9a889385151fa4ea4e15
|
|
4
|
+
data.tar.gz: 85af8b9d2d89291d84061124a745af33081b4874d65f257656dbae45b1162aa7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7aefb8b87910dc5d7fa25d1ab5892521de70936ce78720f112c6872e542f75baf2f99d721e86ad557480ea913d9c4999679619a12170e678225cdbf520664a1d
|
|
7
|
+
data.tar.gz: b38dc84d5e6859ba8bcace8b5b6ba1123bbc27255881ac3ff60f58df61a03a28fd8e25fdcb7cd5f51505bebbf40942288637453aca9dbc6aa049e70c957e818c
|
data/lib/lsp.rb
CHANGED
|
@@ -116,17 +116,6 @@ module Lsp
|
|
|
116
116
|
TextDocumentIdentifier.new(
|
|
117
117
|
URI(params.fetch(:textDocument).fetch(:uri))),
|
|
118
118
|
Position.from_hash(params.fetch(:position))))
|
|
119
|
-
when "textDocument/didChange"
|
|
120
|
-
handle_text_document_did_change(
|
|
121
|
-
DidChangeTextDocumentParams.new(
|
|
122
|
-
VersionedTextDocumentIdentifier.new(
|
|
123
|
-
URI(params.fetch(:textDocument).fetch(:uri)),
|
|
124
|
-
params.fetch(:textDocument).fetch(:version)),
|
|
125
|
-
params.fetch(:contentChanges).map do |contentChange|
|
|
126
|
-
next if contentChange[:range]
|
|
127
|
-
TextDocumentContentChangeEvent.new(
|
|
128
|
-
contentChange.fetch(:text))
|
|
129
|
-
end.compact))
|
|
130
119
|
else
|
|
131
120
|
ResponseMessage.new(nil, ResponseError::MethodNotFound.new)
|
|
132
121
|
end
|
|
@@ -142,6 +131,17 @@ module Lsp
|
|
|
142
131
|
case method_name
|
|
143
132
|
when "textDocument/didOpen"
|
|
144
133
|
handle_text_document_did_open
|
|
134
|
+
when "textDocument/didChange"
|
|
135
|
+
handle_text_document_did_change(
|
|
136
|
+
DidChangeTextDocumentParams.new(
|
|
137
|
+
VersionedTextDocumentIdentifier.new(
|
|
138
|
+
URI(params.fetch(:textDocument).fetch(:uri)),
|
|
139
|
+
params.fetch(:textDocument).fetch(:version)),
|
|
140
|
+
params.fetch(:contentChanges).map do |contentChange|
|
|
141
|
+
next if contentChange[:range]
|
|
142
|
+
TextDocumentContentChangeEvent.new(
|
|
143
|
+
contentChange.fetch(:text))
|
|
144
|
+
end.compact))
|
|
145
145
|
end
|
|
146
146
|
rescue NotImplementedError
|
|
147
147
|
end
|
data/lsp-protocol.gemspec
CHANGED
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'lsp-protocol'
|
|
7
|
-
spec.version = '0.0.
|
|
7
|
+
spec.version = '0.0.7'
|
|
8
8
|
spec.licenses = ['MIT']
|
|
9
9
|
spec.authors = ['Rafał Łasocha']
|
|
10
10
|
spec.email = 'lsp@swistak35.com'
|