language_server 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/bin/console +6 -0
  3. data/circle.yml +0 -1
  4. data/docker-compose.yml +2 -7
  5. data/language_server.gemspec +1 -0
  6. data/lib/language_server/completion_provider/ad_hoc.rb +6 -6
  7. data/lib/language_server/completion_provider/rcodetools.rb +3 -5
  8. data/lib/language_server/definition_provider/ad_hoc.rb +34 -0
  9. data/lib/language_server/logger.rb +37 -0
  10. data/lib/language_server/project/node.rb +65 -1
  11. data/lib/language_server/project/parser.rb +40 -10
  12. data/lib/language_server/project.rb +20 -3
  13. data/lib/language_server/version.rb +1 -1
  14. data/lib/language_server.rb +43 -24
  15. metadata +19 -110
  16. data/Dockerfile-node.development +0 -6
  17. data/bin/generate_files +0 -5
  18. data/lib/language_server/protocol/constants/completion_item_kind.rb +0 -29
  19. data/lib/language_server/protocol/constants/diagnostic_severity.rb +0 -24
  20. data/lib/language_server/protocol/constants/document_highlight_kind.rb +0 -23
  21. data/lib/language_server/protocol/constants/error_codes.rb +0 -18
  22. data/lib/language_server/protocol/constants/file_change_type.rb +0 -23
  23. data/lib/language_server/protocol/constants/initialize_error.rb +0 -15
  24. data/lib/language_server/protocol/constants/insert_text_format.rb +0 -27
  25. data/lib/language_server/protocol/constants/message_type.rb +0 -24
  26. data/lib/language_server/protocol/constants/symbol_kind.rb +0 -29
  27. data/lib/language_server/protocol/constants/text_document_save_reason.rb +0 -24
  28. data/lib/language_server/protocol/constants/text_document_sync_kind.rb +0 -26
  29. data/lib/language_server/protocol/constants.rb +0 -11
  30. data/lib/language_server/protocol/interfaces/apply_workspace_edit_params.rb +0 -29
  31. data/lib/language_server/protocol/interfaces/apply_workspace_edit_response.rb +0 -29
  32. data/lib/language_server/protocol/interfaces/cancel_params.rb +0 -29
  33. data/lib/language_server/protocol/interfaces/client_capabilities.rb +0 -47
  34. data/lib/language_server/protocol/interfaces/code_action_context.rb +0 -33
  35. data/lib/language_server/protocol/interfaces/code_action_params.rb +0 -50
  36. data/lib/language_server/protocol/interfaces/code_lens.rb +0 -55
  37. data/lib/language_server/protocol/interfaces/code_lens_options.rb +0 -32
  38. data/lib/language_server/protocol/interfaces/code_lens_params.rb +0 -29
  39. data/lib/language_server/protocol/interfaces/code_lens_registration_options.rb +0 -29
  40. data/lib/language_server/protocol/interfaces/command.rb +0 -48
  41. data/lib/language_server/protocol/interfaces/completion_item.rb +0 -145
  42. data/lib/language_server/protocol/interfaces/completion_list.rb +0 -43
  43. data/lib/language_server/protocol/interfaces/completion_options.rb +0 -42
  44. data/lib/language_server/protocol/interfaces/completion_registration_options.rb +0 -39
  45. data/lib/language_server/protocol/interfaces/diagnostic.rb +0 -67
  46. data/lib/language_server/protocol/interfaces/did_change_configuration_params.rb +0 -29
  47. data/lib/language_server/protocol/interfaces/did_change_text_document_params.rb +0 -40
  48. data/lib/language_server/protocol/interfaces/did_change_watched_files_params.rb +0 -29
  49. data/lib/language_server/protocol/interfaces/did_close_text_document_params.rb +0 -29
  50. data/lib/language_server/protocol/interfaces/did_open_text_document_params.rb +0 -29
  51. data/lib/language_server/protocol/interfaces/did_save_text_document_params.rb +0 -39
  52. data/lib/language_server/protocol/interfaces/document_filter.rb +0 -47
  53. data/lib/language_server/protocol/interfaces/document_formatting_params.rb +0 -38
  54. data/lib/language_server/protocol/interfaces/document_highlight.rb +0 -43
  55. data/lib/language_server/protocol/interfaces/document_link.rb +0 -42
  56. data/lib/language_server/protocol/interfaces/document_link_options.rb +0 -32
  57. data/lib/language_server/protocol/interfaces/document_link_params.rb +0 -29
  58. data/lib/language_server/protocol/interfaces/document_link_registration_options.rb +0 -29
  59. data/lib/language_server/protocol/interfaces/document_on_type_formatting_options.rb +0 -41
  60. data/lib/language_server/protocol/interfaces/document_on_type_formatting_params.rb +0 -56
  61. data/lib/language_server/protocol/interfaces/document_on_type_formatting_registration_options.rb +0 -38
  62. data/lib/language_server/protocol/interfaces/document_range_formatting_params.rb +0 -47
  63. data/lib/language_server/protocol/interfaces/document_symbol_params.rb +0 -29
  64. data/lib/language_server/protocol/interfaces/execute_command_options.rb +0 -32
  65. data/lib/language_server/protocol/interfaces/execute_command_params.rb +0 -38
  66. data/lib/language_server/protocol/interfaces/execute_command_registration_options.rb +0 -32
  67. data/lib/language_server/protocol/interfaces/file_event.rb +0 -41
  68. data/lib/language_server/protocol/interfaces/formatting_options.rb +0 -41
  69. data/lib/language_server/protocol/interfaces/hover.rb +0 -42
  70. data/lib/language_server/protocol/interfaces/initialize_error.rb +0 -35
  71. data/lib/language_server/protocol/interfaces/initialize_params.rb +0 -79
  72. data/lib/language_server/protocol/interfaces/initialize_result.rb +0 -29
  73. data/lib/language_server/protocol/interfaces/location.rb +0 -32
  74. data/lib/language_server/protocol/interfaces/log_message_params.rb +0 -38
  75. data/lib/language_server/protocol/interfaces/message.rb +0 -26
  76. data/lib/language_server/protocol/interfaces/message_action_item.rb +0 -29
  77. data/lib/language_server/protocol/interfaces/notification_message.rb +0 -38
  78. data/lib/language_server/protocol/interfaces/parameter_information.rb +0 -44
  79. data/lib/language_server/protocol/interfaces/position.rb +0 -38
  80. data/lib/language_server/protocol/interfaces/publish_diagnostics_params.rb +0 -38
  81. data/lib/language_server/protocol/interfaces/range.rb +0 -38
  82. data/lib/language_server/protocol/interfaces/reference_context.rb +0 -29
  83. data/lib/language_server/protocol/interfaces/reference_params.rb +0 -26
  84. data/lib/language_server/protocol/interfaces/registration.rb +0 -51
  85. data/lib/language_server/protocol/interfaces/registration_params.rb +0 -26
  86. data/lib/language_server/protocol/interfaces/rename_params.rb +0 -49
  87. data/lib/language_server/protocol/interfaces/request_message.rb +0 -47
  88. data/lib/language_server/protocol/interfaces/response_error.rb +0 -48
  89. data/lib/language_server/protocol/interfaces/response_message.rb +0 -48
  90. data/lib/language_server/protocol/interfaces/save_options.rb +0 -32
  91. data/lib/language_server/protocol/interfaces/server_capabilities.rb +0 -183
  92. data/lib/language_server/protocol/interfaces/show_message_params.rb +0 -38
  93. data/lib/language_server/protocol/interfaces/show_message_request_params.rb +0 -47
  94. data/lib/language_server/protocol/interfaces/signature_help.rb +0 -64
  95. data/lib/language_server/protocol/interfaces/signature_help_options.rb +0 -33
  96. data/lib/language_server/protocol/interfaces/signature_help_registration_options.rb +0 -30
  97. data/lib/language_server/protocol/interfaces/signature_information.rb +0 -54
  98. data/lib/language_server/protocol/interfaces/symbol_information.rb +0 -60
  99. data/lib/language_server/protocol/interfaces/text_document_change_registration_options.rb +0 -33
  100. data/lib/language_server/protocol/interfaces/text_document_client_capabilities.rb +0 -155
  101. data/lib/language_server/protocol/interfaces/text_document_content_change_event.rb +0 -51
  102. data/lib/language_server/protocol/interfaces/text_document_edit.rb +0 -38
  103. data/lib/language_server/protocol/interfaces/text_document_identifier.rb +0 -29
  104. data/lib/language_server/protocol/interfaces/text_document_item.rb +0 -57
  105. data/lib/language_server/protocol/interfaces/text_document_position_params.rb +0 -38
  106. data/lib/language_server/protocol/interfaces/text_document_registration_options.rb +0 -30
  107. data/lib/language_server/protocol/interfaces/text_document_save_registration_options.rb +0 -29
  108. data/lib/language_server/protocol/interfaces/text_document_sync_options.rb +0 -66
  109. data/lib/language_server/protocol/interfaces/text_edit.rb +0 -40
  110. data/lib/language_server/protocol/interfaces/unregistration.rb +0 -42
  111. data/lib/language_server/protocol/interfaces/unregistration_params.rb +0 -26
  112. data/lib/language_server/protocol/interfaces/versioned_text_document_identifier.rb +0 -29
  113. data/lib/language_server/protocol/interfaces/will_save_text_document_params.rb +0 -41
  114. data/lib/language_server/protocol/interfaces/workspace_client_capabilites.rb +0 -78
  115. data/lib/language_server/protocol/interfaces/workspace_edit.rb +0 -40
  116. data/lib/language_server/protocol/interfaces/workspace_symbol_params.rb +0 -32
  117. data/lib/language_server/protocol/interfaces.rb +0 -87
  118. data/lib/language_server/protocol/stdio/reader.rb +0 -37
  119. data/lib/language_server/protocol/stdio/writer.rb +0 -38
  120. data/lib/language_server/protocol/stdio.rb +0 -2
  121. data/scripts/generateFiles.ts +0 -224
  122. data/yarn.lock +0 -295
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.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-08-20 00:00:00.000000000 Z
11
+ date: 2017-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcodetools
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: language_server-protocol
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +148,12 @@ files:
134
148
  - ".vscode/settings.json"
135
149
  - CODE_OF_CONDUCT.md
136
150
  - Dockerfile
137
- - Dockerfile-node.development
138
151
  - Dockerfile.development
139
152
  - Gemfile
140
153
  - LICENSE.txt
141
154
  - README.md
142
155
  - Rakefile
143
156
  - bin/console
144
- - bin/generate_files
145
157
  - bin/m
146
158
  - bin/setup
147
159
  - circle.yml
@@ -152,118 +164,15 @@ files:
152
164
  - lib/language_server.rb
153
165
  - lib/language_server/completion_provider/ad_hoc.rb
154
166
  - lib/language_server/completion_provider/rcodetools.rb
167
+ - lib/language_server/definition_provider/ad_hoc.rb
155
168
  - lib/language_server/file_store.rb
156
169
  - lib/language_server/linter/ruby_wc.rb
170
+ - lib/language_server/logger.rb
157
171
  - lib/language_server/project.rb
158
172
  - lib/language_server/project/node.rb
159
173
  - lib/language_server/project/parser.rb
160
- - lib/language_server/protocol/constants.rb
161
- - lib/language_server/protocol/constants/completion_item_kind.rb
162
- - lib/language_server/protocol/constants/diagnostic_severity.rb
163
- - lib/language_server/protocol/constants/document_highlight_kind.rb
164
- - lib/language_server/protocol/constants/error_codes.rb
165
- - lib/language_server/protocol/constants/file_change_type.rb
166
- - lib/language_server/protocol/constants/initialize_error.rb
167
- - lib/language_server/protocol/constants/insert_text_format.rb
168
- - lib/language_server/protocol/constants/message_type.rb
169
- - lib/language_server/protocol/constants/symbol_kind.rb
170
- - lib/language_server/protocol/constants/text_document_save_reason.rb
171
- - lib/language_server/protocol/constants/text_document_sync_kind.rb
172
- - lib/language_server/protocol/interfaces.rb
173
- - lib/language_server/protocol/interfaces/apply_workspace_edit_params.rb
174
- - lib/language_server/protocol/interfaces/apply_workspace_edit_response.rb
175
- - lib/language_server/protocol/interfaces/cancel_params.rb
176
- - lib/language_server/protocol/interfaces/client_capabilities.rb
177
- - lib/language_server/protocol/interfaces/code_action_context.rb
178
- - lib/language_server/protocol/interfaces/code_action_params.rb
179
- - lib/language_server/protocol/interfaces/code_lens.rb
180
- - lib/language_server/protocol/interfaces/code_lens_options.rb
181
- - lib/language_server/protocol/interfaces/code_lens_params.rb
182
- - lib/language_server/protocol/interfaces/code_lens_registration_options.rb
183
- - lib/language_server/protocol/interfaces/command.rb
184
- - lib/language_server/protocol/interfaces/completion_item.rb
185
- - lib/language_server/protocol/interfaces/completion_list.rb
186
- - lib/language_server/protocol/interfaces/completion_options.rb
187
- - lib/language_server/protocol/interfaces/completion_registration_options.rb
188
- - lib/language_server/protocol/interfaces/diagnostic.rb
189
- - lib/language_server/protocol/interfaces/did_change_configuration_params.rb
190
- - lib/language_server/protocol/interfaces/did_change_text_document_params.rb
191
- - lib/language_server/protocol/interfaces/did_change_watched_files_params.rb
192
- - lib/language_server/protocol/interfaces/did_close_text_document_params.rb
193
- - lib/language_server/protocol/interfaces/did_open_text_document_params.rb
194
- - lib/language_server/protocol/interfaces/did_save_text_document_params.rb
195
- - lib/language_server/protocol/interfaces/document_filter.rb
196
- - lib/language_server/protocol/interfaces/document_formatting_params.rb
197
- - lib/language_server/protocol/interfaces/document_highlight.rb
198
- - lib/language_server/protocol/interfaces/document_link.rb
199
- - lib/language_server/protocol/interfaces/document_link_options.rb
200
- - lib/language_server/protocol/interfaces/document_link_params.rb
201
- - lib/language_server/protocol/interfaces/document_link_registration_options.rb
202
- - lib/language_server/protocol/interfaces/document_on_type_formatting_options.rb
203
- - lib/language_server/protocol/interfaces/document_on_type_formatting_params.rb
204
- - lib/language_server/protocol/interfaces/document_on_type_formatting_registration_options.rb
205
- - lib/language_server/protocol/interfaces/document_range_formatting_params.rb
206
- - lib/language_server/protocol/interfaces/document_symbol_params.rb
207
- - lib/language_server/protocol/interfaces/execute_command_options.rb
208
- - lib/language_server/protocol/interfaces/execute_command_params.rb
209
- - lib/language_server/protocol/interfaces/execute_command_registration_options.rb
210
- - lib/language_server/protocol/interfaces/file_event.rb
211
- - lib/language_server/protocol/interfaces/formatting_options.rb
212
- - lib/language_server/protocol/interfaces/hover.rb
213
- - lib/language_server/protocol/interfaces/initialize_error.rb
214
- - lib/language_server/protocol/interfaces/initialize_params.rb
215
- - lib/language_server/protocol/interfaces/initialize_result.rb
216
- - lib/language_server/protocol/interfaces/location.rb
217
- - lib/language_server/protocol/interfaces/log_message_params.rb
218
- - lib/language_server/protocol/interfaces/message.rb
219
- - lib/language_server/protocol/interfaces/message_action_item.rb
220
- - lib/language_server/protocol/interfaces/notification_message.rb
221
- - lib/language_server/protocol/interfaces/parameter_information.rb
222
- - lib/language_server/protocol/interfaces/position.rb
223
- - lib/language_server/protocol/interfaces/publish_diagnostics_params.rb
224
- - lib/language_server/protocol/interfaces/range.rb
225
- - lib/language_server/protocol/interfaces/reference_context.rb
226
- - lib/language_server/protocol/interfaces/reference_params.rb
227
- - lib/language_server/protocol/interfaces/registration.rb
228
- - lib/language_server/protocol/interfaces/registration_params.rb
229
- - lib/language_server/protocol/interfaces/rename_params.rb
230
- - lib/language_server/protocol/interfaces/request_message.rb
231
- - lib/language_server/protocol/interfaces/response_error.rb
232
- - lib/language_server/protocol/interfaces/response_message.rb
233
- - lib/language_server/protocol/interfaces/save_options.rb
234
- - lib/language_server/protocol/interfaces/server_capabilities.rb
235
- - lib/language_server/protocol/interfaces/show_message_params.rb
236
- - lib/language_server/protocol/interfaces/show_message_request_params.rb
237
- - lib/language_server/protocol/interfaces/signature_help.rb
238
- - lib/language_server/protocol/interfaces/signature_help_options.rb
239
- - lib/language_server/protocol/interfaces/signature_help_registration_options.rb
240
- - lib/language_server/protocol/interfaces/signature_information.rb
241
- - lib/language_server/protocol/interfaces/symbol_information.rb
242
- - lib/language_server/protocol/interfaces/text_document_change_registration_options.rb
243
- - lib/language_server/protocol/interfaces/text_document_client_capabilities.rb
244
- - lib/language_server/protocol/interfaces/text_document_content_change_event.rb
245
- - lib/language_server/protocol/interfaces/text_document_edit.rb
246
- - lib/language_server/protocol/interfaces/text_document_identifier.rb
247
- - lib/language_server/protocol/interfaces/text_document_item.rb
248
- - lib/language_server/protocol/interfaces/text_document_position_params.rb
249
- - lib/language_server/protocol/interfaces/text_document_registration_options.rb
250
- - lib/language_server/protocol/interfaces/text_document_save_registration_options.rb
251
- - lib/language_server/protocol/interfaces/text_document_sync_options.rb
252
- - lib/language_server/protocol/interfaces/text_edit.rb
253
- - lib/language_server/protocol/interfaces/unregistration.rb
254
- - lib/language_server/protocol/interfaces/unregistration_params.rb
255
- - lib/language_server/protocol/interfaces/versioned_text_document_identifier.rb
256
- - lib/language_server/protocol/interfaces/will_save_text_document_params.rb
257
- - lib/language_server/protocol/interfaces/workspace_client_capabilites.rb
258
- - lib/language_server/protocol/interfaces/workspace_edit.rb
259
- - lib/language_server/protocol/interfaces/workspace_symbol_params.rb
260
- - lib/language_server/protocol/stdio.rb
261
- - lib/language_server/protocol/stdio/reader.rb
262
- - lib/language_server/protocol/stdio/writer.rb
263
174
  - lib/language_server/version.rb
264
175
  - package.json
265
- - scripts/generateFiles.ts
266
- - yarn.lock
267
176
  homepage: https://github.com/mtsmfm/language_server-ruby
268
177
  licenses:
269
178
  - MIT
@@ -284,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
193
  version: '0'
285
194
  requirements: []
286
195
  rubyforge_project:
287
- rubygems_version: 2.6.12
196
+ rubygems_version: 2.6.13
288
197
  signing_key:
289
198
  specification_version: 4
290
199
  summary: A Ruby Language Server implementation
@@ -1,6 +0,0 @@
1
- FROM node:7.10-alpine
2
-
3
- RUN mkdir /app && chown node:node /app
4
-
5
- USER node
6
- WORKDIR /app
data/bin/generate_files DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env sh
2
-
3
- set -ex
4
- yarn install
5
- yarn run -s ts-node scripts/generateFiles.ts
@@ -1,29 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # The kind of a completion entry.
6
- #
7
- module CompletionItemKind
8
- TEXT = 1
9
- METHOD = 2
10
- FUNCTION = 3
11
- CONSTRUCTOR = 4
12
- FIELD = 5
13
- VARIABLE = 6
14
- CLASS = 7
15
- INTERFACE = 8
16
- MODULE = 9
17
- PROPERTY = 10
18
- UNIT = 11
19
- VALUE = 12
20
- ENUM = 13
21
- KEYWORD = 14
22
- SNIPPET = 15
23
- COLOR = 16
24
- FILE = 17
25
- REFERENCE = 18
26
- end
27
- end
28
- end
29
- end
@@ -1,24 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- module DiagnosticSeverity
5
- #
6
- # Reports an error.
7
- #
8
- ERROR = 1
9
- #
10
- # Reports a warning.
11
- #
12
- WARNING = 2
13
- #
14
- # Reports an information.
15
- #
16
- INFORMATION = 3
17
- #
18
- # Reports a hint.
19
- #
20
- HINT = 4
21
- end
22
- end
23
- end
24
- end
@@ -1,23 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # A document highlight kind.
6
- #
7
- module DocumentHighlightKind
8
- #
9
- # A textual occurrence.
10
- #
11
- TEXT = 1
12
- #
13
- # Read-access of a symbol, like reading a variable.
14
- #
15
- READ = 2
16
- #
17
- # Write-access of a symbol, like writing to a variable.
18
- #
19
- WRITE = 3
20
- end
21
- end
22
- end
23
- end
@@ -1,18 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- module ErrorCodes
5
- PARSE_ERROR = -32700
6
- INVALID_REQUEST = -32600
7
- METHOD_NOT_FOUND = -32601
8
- INVALID_PARAMS = -32602
9
- INTERNAL_ERROR = -32603
10
- SERVER_ERROR_START = -32099
11
- SERVER_ERROR_END = -32000
12
- SERVER_NOT_INITIALIZED = -32002
13
- UNKNOWN_ERROR_CODE = -32001
14
- REQUEST_CANCELLED = -32800
15
- end
16
- end
17
- end
18
- end
@@ -1,23 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # The file event type.
6
- #
7
- module FileChangeType
8
- #
9
- # The file got created.
10
- #
11
- CREATED = 1
12
- #
13
- # The file got changed.
14
- #
15
- CHANGED = 2
16
- #
17
- # The file got deleted.
18
- #
19
- DELETED = 3
20
- end
21
- end
22
- end
23
- end
@@ -1,15 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # Known error codes for an `InitializeError`;
6
- #
7
- module InitializeError
8
- #
9
- # If the protocol version provided by the client can't be handled by the server.
10
- #
11
- UNKNOWN_PROTOCOL_VERSION = 1
12
- end
13
- end
14
- end
15
- end
@@ -1,27 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # Defines whether the insert text in a completion item should be interpreted as
6
- # plain text or a snippet.
7
- #
8
- module InsertTextFormat
9
- #
10
- # The primary text to be inserted is treated as a plain string.
11
- #
12
- PLAIN_TEXT = 1
13
- #
14
- # The primary text to be inserted is treated as a snippet.
15
- #
16
- # A snippet can define tab stops and placeholders with `$1`, `$2`
17
- # and `${3:foo}`. `$0` defines the final tab stop, it defaults to
18
- # the end of the snippet. Placeholders with equal identifiers are linked,
19
- # that is typing in one will update others too.
20
- #
21
- # See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
22
- #
23
- SNIPPET = 2
24
- end
25
- end
26
- end
27
- end
@@ -1,24 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- module MessageType
5
- #
6
- # An error message.
7
- #
8
- ERROR = 1
9
- #
10
- # A warning message.
11
- #
12
- WARNING = 2
13
- #
14
- # An information message.
15
- #
16
- INFO = 3
17
- #
18
- # A log message.
19
- #
20
- LOG = 4
21
- end
22
- end
23
- end
24
- end
@@ -1,29 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # A symbol kind.
6
- #
7
- module SymbolKind
8
- FILE = 1
9
- MODULE = 2
10
- NAMESPACE = 3
11
- PACKAGE = 4
12
- CLASS = 5
13
- METHOD = 6
14
- PROPERTY = 7
15
- FIELD = 8
16
- CONSTRUCTOR = 9
17
- ENUM = 10
18
- INTERFACE = 11
19
- FUNCTION = 12
20
- VARIABLE = 13
21
- CONSTANT = 14
22
- STRING = 15
23
- NUMBER = 16
24
- BOOLEAN = 17
25
- ARRAY = 18
26
- end
27
- end
28
- end
29
- end
@@ -1,24 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # Represents reasons why a text document is saved.
6
- #
7
- module TextDocumentSaveReason
8
- #
9
- # Manually triggered, e.g. by the user pressing save, by starting debugging,
10
- # or by an API call.
11
- #
12
- MANUAL = 1
13
- #
14
- # Automatic after a delay.
15
- #
16
- AFTER_DELAY = 2
17
- #
18
- # When the editor lost focus.
19
- #
20
- FOCUS_OUT = 3
21
- end
22
- end
23
- end
24
- end
@@ -1,26 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Constants
4
- #
5
- # Defines how the host (editor) should sync document changes to the language server.
6
- #
7
- module TextDocumentSyncKind
8
- #
9
- # Documents should not be synced at all.
10
- #
11
- NONE = 0
12
- #
13
- # Documents are synced by always sending the full content
14
- # of the document.
15
- #
16
- FULL = 1
17
- #
18
- # Documents are synced by sending the full content on open.
19
- # After that only incremental updates to the document are
20
- # send.
21
- #
22
- INCREMENTAL = 2
23
- end
24
- end
25
- end
26
- end
@@ -1,11 +0,0 @@
1
- require "language_server/protocol/constants/error_codes"
2
- require "language_server/protocol/constants/diagnostic_severity"
3
- require "language_server/protocol/constants/initialize_error"
4
- require "language_server/protocol/constants/text_document_sync_kind"
5
- require "language_server/protocol/constants/message_type"
6
- require "language_server/protocol/constants/text_document_save_reason"
7
- require "language_server/protocol/constants/file_change_type"
8
- require "language_server/protocol/constants/insert_text_format"
9
- require "language_server/protocol/constants/completion_item_kind"
10
- require "language_server/protocol/constants/document_highlight_kind"
11
- require "language_server/protocol/constants/symbol_kind"
@@ -1,29 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Interfaces
4
- class ApplyWorkspaceEditParams
5
- def initialize(edit:)
6
- @attributes = {}
7
-
8
- @attributes[:edit] = edit
9
-
10
- @attributes.freeze
11
- end
12
-
13
- #
14
- # The edits to apply.
15
- #
16
- # @return [WorkspaceEdit]
17
- def edit
18
- attributes.fetch(:edit)
19
- end
20
-
21
- attr_reader :attributes
22
-
23
- def to_json(*args)
24
- attributes.to_json(*args)
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Interfaces
4
- class ApplyWorkspaceEditResponse
5
- def initialize(applied:)
6
- @attributes = {}
7
-
8
- @attributes[:applied] = applied
9
-
10
- @attributes.freeze
11
- end
12
-
13
- #
14
- # Indicates whether the edit was applied or not.
15
- #
16
- # @return [boolean]
17
- def applied
18
- attributes.fetch(:applied)
19
- end
20
-
21
- attr_reader :attributes
22
-
23
- def to_json(*args)
24
- attributes.to_json(*args)
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Interfaces
4
- class CancelParams
5
- def initialize(id:)
6
- @attributes = {}
7
-
8
- @attributes[:id] = id
9
-
10
- @attributes.freeze
11
- end
12
-
13
- #
14
- # The request id to cancel.
15
- #
16
- # @return [string | number]
17
- def id
18
- attributes.fetch(:id)
19
- end
20
-
21
- attr_reader :attributes
22
-
23
- def to_json(*args)
24
- attributes.to_json(*args)
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,47 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Interfaces
4
- class ClientCapabilities
5
- def initialize(workspace: nil, text_document: nil, experimental: nil)
6
- @attributes = {}
7
-
8
- @attributes[:workspace] = workspace if workspace
9
- @attributes[:textDocument] = text_document if text_document
10
- @attributes[:experimental] = experimental if experimental
11
-
12
- @attributes.freeze
13
- end
14
-
15
- #
16
- # Workspace specific client capabilities.
17
- #
18
- # @return [WorkspaceClientCapabilites]
19
- def workspace
20
- attributes.fetch(:workspace)
21
- end
22
-
23
- #
24
- # Text document specific client capabilities.
25
- #
26
- # @return [TextDocumentClientCapabilities]
27
- def text_document
28
- attributes.fetch(:textDocument)
29
- end
30
-
31
- #
32
- # Experimental client capabilities.
33
- #
34
- # @return [any]
35
- def experimental
36
- attributes.fetch(:experimental)
37
- end
38
-
39
- attr_reader :attributes
40
-
41
- def to_json(*args)
42
- attributes.to_json(*args)
43
- end
44
- end
45
- end
46
- end
47
- end
@@ -1,33 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Interfaces
4
- #
5
- # Contains additional diagnostic information about the context in which
6
- # a code action is run.
7
- #
8
- class CodeActionContext
9
- def initialize(diagnostics:)
10
- @attributes = {}
11
-
12
- @attributes[:diagnostics] = diagnostics
13
-
14
- @attributes.freeze
15
- end
16
-
17
- #
18
- # An array of diagnostics.
19
- #
20
- # @return [Diagnostic[]]
21
- def diagnostics
22
- attributes.fetch(:diagnostics)
23
- end
24
-
25
- attr_reader :attributes
26
-
27
- def to_json(*args)
28
- attributes.to_json(*args)
29
- end
30
- end
31
- end
32
- end
33
- end