language_server-protocol 0.5.0 → 3.7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +13 -7
  4. data/lib/language_server/protocol/constant.rb +35 -11
  5. data/lib/language_server/protocol/constant/completion_item_kind.rb +7 -0
  6. data/lib/language_server/protocol/constant/completion_trigger_kind.rb +25 -0
  7. data/lib/language_server/protocol/constant/insert_text_format.rb +0 -2
  8. data/lib/language_server/protocol/constant/markup_kind.rb +23 -0
  9. data/lib/language_server/protocol/constant/symbol_kind.rb +8 -0
  10. data/lib/language_server/protocol/constant/watch_kind.rb +20 -0
  11. data/lib/language_server/protocol/interface.rb +217 -87
  12. data/lib/language_server/protocol/interface/apply_workspace_edit_params.rb +12 -1
  13. data/lib/language_server/protocol/interface/client_capabilities.rb +1 -1
  14. data/lib/language_server/protocol/interface/color.rb +63 -0
  15. data/lib/language_server/protocol/interface/color_information.rb +42 -0
  16. data/lib/language_server/protocol/interface/color_presentation.rb +56 -0
  17. data/lib/language_server/protocol/interface/color_presentation_params.rb +51 -0
  18. data/lib/language_server/protocol/interface/color_provider_options.rb +27 -0
  19. data/lib/language_server/protocol/interface/completion_context.rb +46 -0
  20. data/lib/language_server/protocol/interface/completion_item.rb +37 -6
  21. data/lib/language_server/protocol/interface/completion_params.rb +34 -0
  22. data/lib/language_server/protocol/interface/completion_registration_options.rb +8 -1
  23. data/lib/language_server/protocol/interface/configuration_item.rb +42 -0
  24. data/lib/language_server/protocol/interface/configuration_params.rb +30 -0
  25. data/lib/language_server/protocol/interface/diagnostic.rb +12 -2
  26. data/lib/language_server/protocol/interface/diagnostic_related_information.rb +47 -0
  27. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +3 -1
  28. data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb +36 -0
  29. data/lib/language_server/protocol/interface/did_change_workspace_folders_params.rb +33 -0
  30. data/lib/language_server/protocol/interface/did_save_text_document_params.rb +1 -1
  31. data/lib/language_server/protocol/interface/document_link.rb +11 -1
  32. data/lib/language_server/protocol/interface/file_system_watcher.rb +44 -0
  33. data/lib/language_server/protocol/interface/hover.rb +1 -1
  34. data/lib/language_server/protocol/interface/initialize_params.rb +15 -1
  35. data/lib/language_server/protocol/interface/initialized_params.rb +24 -0
  36. data/lib/language_server/protocol/interface/markup_content.rb +66 -0
  37. data/lib/language_server/protocol/interface/notification_message.rb +1 -1
  38. data/lib/language_server/protocol/interface/parameter_information.rb +1 -1
  39. data/lib/language_server/protocol/interface/position.rb +6 -1
  40. data/lib/language_server/protocol/interface/registration.rb +1 -1
  41. data/lib/language_server/protocol/interface/rename_params.rb +1 -1
  42. data/lib/language_server/protocol/interface/request_message.rb +1 -1
  43. data/lib/language_server/protocol/interface/server_capabilities.rb +44 -2
  44. data/lib/language_server/protocol/interface/signature_help.rb +2 -2
  45. data/lib/language_server/protocol/interface/signature_information.rb +1 -1
  46. data/lib/language_server/protocol/interface/static_registration_options.rb +37 -0
  47. data/lib/language_server/protocol/interface/symbol_information.rb +23 -3
  48. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +2 -2
  49. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +48 -5
  50. data/lib/language_server/protocol/interface/text_document_item.rb +1 -1
  51. data/lib/language_server/protocol/interface/text_document_sync_options.rb +2 -2
  52. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +5 -1
  53. data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +104 -0
  54. data/lib/language_server/protocol/interface/workspace_edit.rb +4 -3
  55. data/lib/language_server/protocol/interface/workspace_folder.rb +43 -0
  56. data/lib/language_server/protocol/interface/workspace_folders_change_event.rb +45 -0
  57. data/lib/language_server/protocol/version.rb +1 -1
  58. data/scripts/generateFiles.ts +29 -9
  59. metadata +25 -3
@@ -20,9 +20,10 @@ module LanguageServer
20
20
  end
21
21
 
22
22
  #
23
- # An array of `TextDocumentEdit`s to express changes to specific a specific
24
- # version of a text document. Whether a client supports versioned document
25
- # edits is expressed via `WorkspaceClientCapabilites.versionedWorkspaceEdit`.
23
+ # An array of `TextDocumentEdit`s to express changes to n different text documents
24
+ # where each text document edit addresses a specific version of a text document.
25
+ # Whether a client supports versioned document edits is expressed via
26
+ # `WorkspaceClientCapabilities.workspaceEdit.documentChanges`.
26
27
  #
27
28
  # @return [TextDocumentEdit[]]
28
29
  def document_changes
@@ -0,0 +1,43 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ class WorkspaceFolder
5
+ def initialize(uri:, name:)
6
+ @attributes = {}
7
+
8
+ @attributes[:uri] = uri
9
+ @attributes[:name] = name
10
+
11
+ @attributes.freeze
12
+ end
13
+
14
+ #
15
+ # The associated URI for this workspace folder.
16
+ #
17
+ # @return [string]
18
+ def uri
19
+ attributes.fetch(:uri)
20
+ end
21
+
22
+ #
23
+ # The name of the workspace folder. Defaults to the
24
+ # uri's basename.
25
+ #
26
+ # @return [string]
27
+ def name
28
+ attributes.fetch(:name)
29
+ end
30
+
31
+ attr_reader :attributes
32
+
33
+ def to_hash
34
+ attributes
35
+ end
36
+
37
+ def to_json(*args)
38
+ to_hash.to_json(*args)
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,45 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # The workspace folder change event.
6
+ #
7
+ class WorkspaceFoldersChangeEvent
8
+ def initialize(added:, removed:)
9
+ @attributes = {}
10
+
11
+ @attributes[:added] = added
12
+ @attributes[:removed] = removed
13
+
14
+ @attributes.freeze
15
+ end
16
+
17
+ #
18
+ # The array of added workspace folders
19
+ #
20
+ # @return [WorkspaceFolder[]]
21
+ def added
22
+ attributes.fetch(:added)
23
+ end
24
+
25
+ #
26
+ # The array of the removed workspace folders
27
+ #
28
+ # @return [WorkspaceFolder[]]
29
+ def removed
30
+ attributes.fetch(:removed)
31
+ end
32
+
33
+ attr_reader :attributes
34
+
35
+ def to_hash
36
+ attributes
37
+ end
38
+
39
+ def to_json(*args)
40
+ to_hash.to_json(*args)
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -1,5 +1,5 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
- VERSION = "0.5.0"
3
+ VERSION = "3.7.0.0"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ import * as fs from 'fs';
3
3
  import * as path from 'path';
4
4
  import * as fetch from 'isomorphic-fetch';
5
5
 
6
- const lspVersion = 'a0d9d12fa6d4c313d3ed70bd842f0a2c8e66e29e';
6
+ const lspVersion = '998fd38abbb73dda270b05aebea0a45b649f1cb4';
7
7
  const rootDir = path.normalize(path.join(__dirname, ".."));
8
8
  const tempDir = path.join(rootDir, "tmp");
9
9
  const protocolMdPath = path.join(tempDir, lspVersion, "protocol.md");
@@ -23,7 +23,7 @@ const createFile = (filePath, content) => {
23
23
  }
24
24
 
25
25
  const extractTypeScriptSource = content => {
26
- const regEx = /^```typescript\n([^]*?)^```\n/mg;
26
+ const regEx = /^```typescript\r\n([^]*?)^```\r\n/mg;
27
27
  let match;
28
28
  let result = "";
29
29
 
@@ -131,7 +131,7 @@ Handlebars.registerHelper("const", s => {
131
131
 
132
132
  (async () => {
133
133
  if (!fs.existsSync(protocolMdPath)) {
134
- const res = await fetch(`https://github.com/Microsoft/language-server-protocol/raw/${lspVersion}/protocol.md`);
134
+ const res = await fetch(`https://github.com/Microsoft/language-server-protocol/raw/${lspVersion}/specification.md`);
135
135
  createFile(protocolMdPath, await res.text());
136
136
  }
137
137
 
@@ -218,15 +218,35 @@ end
218
218
  });
219
219
 
220
220
  createFile(path.join(rootDir, "lib", "language_server", "protocol", "interface.rb"), Handlebars.compile(`
221
- {{#each interfaces}}
222
- require "language_server/protocol/interface/{{snake interface.name}}"
221
+ module LanguageServer
222
+ module Protocol
223
+ module Interface
224
+ {{#each names}}
225
+ autoload :{{this}}, "language_server/protocol/interface/{{snake this}}"
226
+ {{/each}}
227
+
228
+ {{#each names}}
229
+ require "language_server/protocol/interface/{{snake this}}"
223
230
  {{/each}}
224
- `.slice(1), {noEscape: true})({interfaces}));
231
+ end
232
+ end
233
+ end
234
+ `.slice(1), {noEscape: true})({names: interfaces.map(i => i.interface.name).sort()}));
225
235
 
226
236
  createFile(path.join(rootDir, "lib", "language_server", "protocol", "constant.rb"), Handlebars.compile(`
227
- {{#each modules}}
228
- require "language_server/protocol/constant/{{snake module.name}}"
237
+ module LanguageServer
238
+ module Protocol
239
+ module Constant
240
+ {{#each names}}
241
+ autoload :{{this}}, "language_server/protocol/constant/{{snake this}}"
242
+ {{/each}}
243
+
244
+ {{#each names}}
245
+ require "language_server/protocol/constant/{{snake this}}"
229
246
  {{/each}}
230
- `.slice(1), {noEscape: true})({modules}));
247
+ end
248
+ end
249
+ end
250
+ `.slice(1), {noEscape: true})({names: modules.map(i => i.module.name).sort()}));
231
251
 
232
252
  })();
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: 0.5.0
4
+ version: 3.7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fumiaki MATSUSHIMA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-08 00:00:00.000000000 Z
11
+ date: 2018-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,16 +138,19 @@ files:
138
138
  - lib/language_server/protocol.rb
139
139
  - lib/language_server/protocol/constant.rb
140
140
  - lib/language_server/protocol/constant/completion_item_kind.rb
141
+ - lib/language_server/protocol/constant/completion_trigger_kind.rb
141
142
  - lib/language_server/protocol/constant/diagnostic_severity.rb
142
143
  - lib/language_server/protocol/constant/document_highlight_kind.rb
143
144
  - lib/language_server/protocol/constant/error_codes.rb
144
145
  - lib/language_server/protocol/constant/file_change_type.rb
145
146
  - lib/language_server/protocol/constant/initialize_error.rb
146
147
  - lib/language_server/protocol/constant/insert_text_format.rb
148
+ - lib/language_server/protocol/constant/markup_kind.rb
147
149
  - lib/language_server/protocol/constant/message_type.rb
148
150
  - lib/language_server/protocol/constant/symbol_kind.rb
149
151
  - lib/language_server/protocol/constant/text_document_save_reason.rb
150
152
  - lib/language_server/protocol/constant/text_document_sync_kind.rb
153
+ - lib/language_server/protocol/constant/watch_kind.rb
151
154
  - lib/language_server/protocol/interface.rb
152
155
  - lib/language_server/protocol/interface/apply_workspace_edit_params.rb
153
156
  - lib/language_server/protocol/interface/apply_workspace_edit_response.rb
@@ -159,15 +162,27 @@ files:
159
162
  - lib/language_server/protocol/interface/code_lens_options.rb
160
163
  - lib/language_server/protocol/interface/code_lens_params.rb
161
164
  - lib/language_server/protocol/interface/code_lens_registration_options.rb
165
+ - lib/language_server/protocol/interface/color.rb
166
+ - lib/language_server/protocol/interface/color_information.rb
167
+ - lib/language_server/protocol/interface/color_presentation.rb
168
+ - lib/language_server/protocol/interface/color_presentation_params.rb
169
+ - lib/language_server/protocol/interface/color_provider_options.rb
162
170
  - lib/language_server/protocol/interface/command.rb
171
+ - lib/language_server/protocol/interface/completion_context.rb
163
172
  - lib/language_server/protocol/interface/completion_item.rb
164
173
  - lib/language_server/protocol/interface/completion_list.rb
165
174
  - lib/language_server/protocol/interface/completion_options.rb
175
+ - lib/language_server/protocol/interface/completion_params.rb
166
176
  - lib/language_server/protocol/interface/completion_registration_options.rb
177
+ - lib/language_server/protocol/interface/configuration_item.rb
178
+ - lib/language_server/protocol/interface/configuration_params.rb
167
179
  - lib/language_server/protocol/interface/diagnostic.rb
180
+ - lib/language_server/protocol/interface/diagnostic_related_information.rb
168
181
  - lib/language_server/protocol/interface/did_change_configuration_params.rb
169
182
  - lib/language_server/protocol/interface/did_change_text_document_params.rb
170
183
  - lib/language_server/protocol/interface/did_change_watched_files_params.rb
184
+ - lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb
185
+ - lib/language_server/protocol/interface/did_change_workspace_folders_params.rb
171
186
  - lib/language_server/protocol/interface/did_close_text_document_params.rb
172
187
  - lib/language_server/protocol/interface/did_open_text_document_params.rb
173
188
  - lib/language_server/protocol/interface/did_save_text_document_params.rb
@@ -187,13 +202,16 @@ files:
187
202
  - lib/language_server/protocol/interface/execute_command_params.rb
188
203
  - lib/language_server/protocol/interface/execute_command_registration_options.rb
189
204
  - lib/language_server/protocol/interface/file_event.rb
205
+ - lib/language_server/protocol/interface/file_system_watcher.rb
190
206
  - lib/language_server/protocol/interface/formatting_options.rb
191
207
  - lib/language_server/protocol/interface/hover.rb
192
208
  - lib/language_server/protocol/interface/initialize_error.rb
193
209
  - lib/language_server/protocol/interface/initialize_params.rb
194
210
  - lib/language_server/protocol/interface/initialize_result.rb
211
+ - lib/language_server/protocol/interface/initialized_params.rb
195
212
  - lib/language_server/protocol/interface/location.rb
196
213
  - lib/language_server/protocol/interface/log_message_params.rb
214
+ - lib/language_server/protocol/interface/markup_content.rb
197
215
  - lib/language_server/protocol/interface/message.rb
198
216
  - lib/language_server/protocol/interface/message_action_item.rb
199
217
  - lib/language_server/protocol/interface/notification_message.rb
@@ -217,6 +235,7 @@ files:
217
235
  - lib/language_server/protocol/interface/signature_help_options.rb
218
236
  - lib/language_server/protocol/interface/signature_help_registration_options.rb
219
237
  - lib/language_server/protocol/interface/signature_information.rb
238
+ - lib/language_server/protocol/interface/static_registration_options.rb
220
239
  - lib/language_server/protocol/interface/symbol_information.rb
221
240
  - lib/language_server/protocol/interface/text_document_change_registration_options.rb
222
241
  - lib/language_server/protocol/interface/text_document_client_capabilities.rb
@@ -234,7 +253,10 @@ files:
234
253
  - lib/language_server/protocol/interface/versioned_text_document_identifier.rb
235
254
  - lib/language_server/protocol/interface/will_save_text_document_params.rb
236
255
  - lib/language_server/protocol/interface/workspace_client_capabilites.rb
256
+ - lib/language_server/protocol/interface/workspace_client_capabilities.rb
237
257
  - lib/language_server/protocol/interface/workspace_edit.rb
258
+ - lib/language_server/protocol/interface/workspace_folder.rb
259
+ - lib/language_server/protocol/interface/workspace_folders_change_event.rb
238
260
  - lib/language_server/protocol/interface/workspace_symbol_params.rb
239
261
  - lib/language_server/protocol/transport.rb
240
262
  - lib/language_server/protocol/transport/stdio.rb
@@ -264,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
286
  version: '0'
265
287
  requirements: []
266
288
  rubyforge_project:
267
- rubygems_version: 2.6.13
289
+ rubygems_version: 2.7.3
268
290
  signing_key:
269
291
  specification_version: 4
270
292
  summary: A Language Server Protocol SDK