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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lsp.rb +11 -11
  3. data/lsp-protocol.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6adcb76cfa923e5f65504e13f90a684eb0340aa8419c692bf8c0f6c6f170160a
4
- data.tar.gz: 75bb1bc7d814e036001c9765555cc3ec51aaf3ccc75a54dcf691491109cd9768
3
+ metadata.gz: af28738c1b81b36f8e88e47c4706766819475a6c454e9a889385151fa4ea4e15
4
+ data.tar.gz: 85af8b9d2d89291d84061124a745af33081b4874d65f257656dbae45b1162aa7
5
5
  SHA512:
6
- metadata.gz: f3e50d68cc7a5685e9b38002f67172870e1e002b3fae240c5f61edba667ef1abd27968bacfed09928cdda8b397464227b86b0765fd75594839aecb33f1922964
7
- data.tar.gz: 2880c1a7b1ec7839ab312774ae7d44511536171144534ef54b9f774187cbdcd8405c802f7a5b20d39ad31e8fb1fc75db1f16be9abe9ebec6ac0e44b78615d241
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
@@ -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.6'
7
+ spec.version = '0.0.7'
8
8
  spec.licenses = ['MIT']
9
9
  spec.authors = ['Rafał Łasocha']
10
10
  spec.email = 'lsp@swistak35.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lsp-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Łasocha