language_server-protocol 3.15.0.2 → 3.16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/language_server/protocol/constant.rb +10 -0
  4. data/lib/language_server/protocol/constant/code_action_kind.rb +6 -4
  5. data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -2
  6. data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
  7. data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -2
  8. data/lib/language_server/protocol/constant/error_codes.rb +26 -3
  9. data/lib/language_server/protocol/constant/failure_handling_kind.rb +6 -5
  10. data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +20 -0
  11. data/lib/language_server/protocol/constant/initialize_error.rb +2 -1
  12. data/lib/language_server/protocol/constant/insert_text_mode.rb +30 -0
  13. data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +13 -0
  14. data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -1
  15. data/lib/language_server/protocol/constant/symbol_tag.rb +15 -0
  16. data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
  17. data/lib/language_server/protocol/constant/text_document_sync_kind.rb +2 -2
  18. data/lib/language_server/protocol/constant/token_format.rb +9 -0
  19. data/lib/language_server/protocol/interface.rb +112 -0
  20. data/lib/language_server/protocol/interface/annotated_text_edit.rb +38 -0
  21. data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +15 -4
  22. data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +36 -0
  23. data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +43 -0
  24. data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +31 -0
  25. data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
  26. data/lib/language_server/protocol/interface/call_hierarchy_options.rb +25 -0
  27. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +43 -0
  28. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +31 -0
  29. data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +25 -0
  30. data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +25 -0
  31. data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
  32. data/lib/language_server/protocol/interface/client_capabilities.rb +12 -3
  33. data/lib/language_server/protocol/interface/code_action.rb +43 -8
  34. data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +44 -1
  35. data/lib/language_server/protocol/interface/code_action_context.rb +7 -6
  36. data/lib/language_server/protocol/interface/code_action_options.rb +13 -3
  37. data/lib/language_server/protocol/interface/code_action_registration_options.rb +2 -1
  38. data/lib/language_server/protocol/interface/code_description.rb +36 -0
  39. data/lib/language_server/protocol/interface/code_lens.rb +5 -3
  40. data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +39 -0
  41. data/lib/language_server/protocol/interface/color_presentation.rb +7 -6
  42. data/lib/language_server/protocol/interface/completion_client_capabilities.rb +1 -1
  43. data/lib/language_server/protocol/interface/completion_context.rb +5 -3
  44. data/lib/language_server/protocol/interface/completion_item.rb +60 -29
  45. data/lib/language_server/protocol/interface/completion_list.rb +2 -2
  46. data/lib/language_server/protocol/interface/completion_options.rb +15 -12
  47. data/lib/language_server/protocol/interface/completion_params.rb +2 -1
  48. data/lib/language_server/protocol/interface/create_file.rb +10 -1
  49. data/lib/language_server/protocol/interface/create_files_params.rb +37 -0
  50. data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +3 -3
  51. data/lib/language_server/protocol/interface/delete_file.rb +10 -1
  52. data/lib/language_server/protocol/interface/delete_files_params.rb +37 -0
  53. data/lib/language_server/protocol/interface/diagnostic.rb +21 -1
  54. data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
  55. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -9
  56. data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +3 -3
  57. data/lib/language_server/protocol/interface/document_filter.rb +7 -3
  58. data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
  59. data/lib/language_server/protocol/interface/document_link.rb +6 -5
  60. data/lib/language_server/protocol/interface/document_symbol.rb +23 -11
  61. data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +24 -2
  62. data/lib/language_server/protocol/interface/document_symbol_options.rb +11 -1
  63. data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +2 -1
  64. data/lib/language_server/protocol/interface/file_create.rb +36 -0
  65. data/lib/language_server/protocol/interface/file_delete.rb +36 -0
  66. data/lib/language_server/protocol/interface/file_operation_filter.rb +46 -0
  67. data/lib/language_server/protocol/interface/file_operation_pattern.rb +67 -0
  68. data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +36 -0
  69. data/lib/language_server/protocol/interface/file_operation_registration_options.rb +36 -0
  70. data/lib/language_server/protocol/interface/file_rename.rb +45 -0
  71. data/lib/language_server/protocol/interface/file_system_watcher.rb +7 -3
  72. data/lib/language_server/protocol/interface/folding_range.rb +17 -8
  73. data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +10 -7
  74. data/lib/language_server/protocol/interface/hover.rb +1 -1
  75. data/lib/language_server/protocol/interface/hover_client_capabilities.rb +3 -2
  76. data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +3 -3
  77. data/lib/language_server/protocol/interface/initialize_params.rb +20 -5
  78. data/lib/language_server/protocol/interface/insert_replace_edit.rb +54 -0
  79. data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +36 -0
  80. data/lib/language_server/protocol/interface/linked_editing_range_options.rb +25 -0
  81. data/lib/language_server/protocol/interface/linked_editing_range_params.rb +25 -0
  82. data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +25 -0
  83. data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
  84. data/lib/language_server/protocol/interface/location_link.rb +9 -7
  85. data/lib/language_server/protocol/interface/log_message_params.rb +1 -1
  86. data/lib/language_server/protocol/interface/log_trace_params.rb +43 -0
  87. data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +45 -0
  88. data/lib/language_server/protocol/interface/markup_content.rb +9 -7
  89. data/lib/language_server/protocol/interface/moniker.rb +64 -0
  90. data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +36 -0
  91. data/lib/language_server/protocol/interface/moniker_options.rb +25 -0
  92. data/lib/language_server/protocol/interface/moniker_params.rb +25 -0
  93. data/lib/language_server/protocol/interface/moniker_registration_options.rb +25 -0
  94. data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +42 -0
  95. data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
  96. data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
  97. data/lib/language_server/protocol/interface/position.rb +5 -5
  98. data/lib/language_server/protocol/interface/progress_params.rb +1 -1
  99. data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +21 -1
  100. data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +2 -1
  101. data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
  102. data/lib/language_server/protocol/interface/rename_client_capabilities.rb +27 -1
  103. data/lib/language_server/protocol/interface/rename_file.rb +10 -1
  104. data/lib/language_server/protocol/interface/rename_files_params.rb +38 -0
  105. data/lib/language_server/protocol/interface/selection_range.rb +2 -1
  106. data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -3
  107. data/lib/language_server/protocol/interface/semantic_tokens.rb +45 -0
  108. data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +97 -0
  109. data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +40 -0
  110. data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +44 -0
  111. data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +30 -0
  112. data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +51 -0
  113. data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +42 -0
  114. data/lib/language_server/protocol/interface/semantic_tokens_options.rb +53 -0
  115. data/lib/language_server/protocol/interface/semantic_tokens_params.rb +34 -0
  116. data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +30 -0
  117. data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +43 -0
  118. data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +25 -0
  119. data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
  120. data/lib/language_server/protocol/interface/server_capabilities.rb +47 -9
  121. data/lib/language_server/protocol/interface/set_trace_params.rb +33 -0
  122. data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +37 -0
  123. data/lib/language_server/protocol/interface/show_document_params.rb +71 -0
  124. data/lib/language_server/protocol/interface/show_document_result.rb +36 -0
  125. data/lib/language_server/protocol/interface/show_message_params.rb +1 -1
  126. data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +36 -0
  127. data/lib/language_server/protocol/interface/show_message_request_params.rb +1 -1
  128. data/lib/language_server/protocol/interface/signature_help.rb +3 -3
  129. data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +1 -1
  130. data/lib/language_server/protocol/interface/signature_help_context.rb +10 -7
  131. data/lib/language_server/protocol/interface/signature_help_options.rb +3 -2
  132. data/lib/language_server/protocol/interface/signature_help_params.rb +3 -2
  133. data/lib/language_server/protocol/interface/signature_information.rb +12 -1
  134. data/lib/language_server/protocol/interface/symbol_information.rb +10 -1
  135. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +1 -1
  136. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +39 -2
  137. data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
  138. data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
  139. data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
  140. data/lib/language_server/protocol/interface/text_document_sync_options.rb +13 -15
  141. data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +3 -3
  142. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +3 -7
  143. data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
  144. data/lib/language_server/protocol/interface/work_done_progress_begin.rb +3 -3
  145. data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +1 -1
  146. data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +1 -1
  147. data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
  148. data/lib/language_server/protocol/interface/work_done_progress_report.rb +5 -5
  149. data/lib/language_server/protocol/interface/workspace_edit.rb +24 -7
  150. data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +23 -1
  151. data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +13 -2
  152. data/lib/language_server/protocol/version.rb +1 -1
  153. metadata +67 -6
@@ -0,0 +1,36 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Matching options for the file operation pattern.
6
+ #
7
+ class FileOperationPatternOptions
8
+ def initialize(ignore_case: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:ignoreCase] = ignore_case if ignore_case
12
+
13
+ @attributes.freeze
14
+ end
15
+
16
+ #
17
+ # The pattern should be matched ignoring casing.
18
+ #
19
+ # @return [boolean]
20
+ def ignore_case
21
+ attributes.fetch(:ignoreCase)
22
+ end
23
+
24
+ attr_reader :attributes
25
+
26
+ def to_hash
27
+ attributes
28
+ end
29
+
30
+ def to_json(*args)
31
+ to_hash.to_json(*args)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # The options to register for file operations.
6
+ #
7
+ class FileOperationRegistrationOptions
8
+ def initialize(filters:)
9
+ @attributes = {}
10
+
11
+ @attributes[:filters] = filters
12
+
13
+ @attributes.freeze
14
+ end
15
+
16
+ #
17
+ # The actual filters.
18
+ #
19
+ # @return [FileOperationFilter[]]
20
+ def filters
21
+ attributes.fetch(:filters)
22
+ end
23
+
24
+ attr_reader :attributes
25
+
26
+ def to_hash
27
+ attributes
28
+ end
29
+
30
+ def to_json(*args)
31
+ to_hash.to_json(*args)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,45 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Represents information on a file/folder rename.
6
+ #
7
+ class FileRename
8
+ def initialize(old_uri:, new_uri:)
9
+ @attributes = {}
10
+
11
+ @attributes[:oldUri] = old_uri
12
+ @attributes[:newUri] = new_uri
13
+
14
+ @attributes.freeze
15
+ end
16
+
17
+ #
18
+ # A file:// URI for the original location of the file/folder being renamed.
19
+ #
20
+ # @return [string]
21
+ def old_uri
22
+ attributes.fetch(:oldUri)
23
+ end
24
+
25
+ #
26
+ # A file:// URI for the new location of the file/folder being renamed.
27
+ #
28
+ # @return [string]
29
+ def new_uri
30
+ attributes.fetch(:newUri)
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
@@ -18,9 +18,13 @@ module LanguageServer
18
18
  # - `*` to match one or more characters in a path segment
19
19
  # - `?` to match on one character in a path segment
20
20
  # - `**` to match any number of path segments, including none
21
- # - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
22
- # - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
23
- # - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
21
+ # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}`
22
+ # matches all TypeScript and JavaScript files)
23
+ # - `[]` to declare a range of characters to match in a path segment
24
+ # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
25
+ # - `[!...]` to negate a range of characters to match in a path segment
26
+ # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not
27
+ # `example.0`)
24
28
  #
25
29
  # @return [string]
26
30
  def glob_pattern
@@ -2,7 +2,9 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  #
5
- # Represents a folding range.
5
+ # Represents a folding range. To be valid, start and end line must be bigger
6
+ # than zero and smaller than the number of lines in the document. Clients
7
+ # are free to ignore invalid ranges.
6
8
  #
7
9
  class FoldingRange
8
10
  def initialize(start_line:, start_character: nil, end_line:, end_character: nil, kind: nil)
@@ -18,7 +20,9 @@ module LanguageServer
18
20
  end
19
21
 
20
22
  #
21
- # The zero-based line number from where the folded range starts.
23
+ # The zero-based start line of the range to fold. The folded area starts
24
+ # after the line's last character. To be valid, the end must be zero or
25
+ # larger and smaller than the number of lines in the document.
22
26
  #
23
27
  # @return [number]
24
28
  def start_line
@@ -26,7 +30,8 @@ module LanguageServer
26
30
  end
27
31
 
28
32
  #
29
- # The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
33
+ # The zero-based character offset from where the folded range starts. If
34
+ # not defined, defaults to the length of the start line.
30
35
  #
31
36
  # @return [number]
32
37
  def start_character
@@ -34,7 +39,9 @@ module LanguageServer
34
39
  end
35
40
 
36
41
  #
37
- # The zero-based line number where the folded range ends.
42
+ # The zero-based end line of the range to fold. The folded area ends with
43
+ # the line's last character. To be valid, the end must be zero or larger
44
+ # and smaller than the number of lines in the document.
38
45
  #
39
46
  # @return [number]
40
47
  def end_line
@@ -42,7 +49,8 @@ module LanguageServer
42
49
  end
43
50
 
44
51
  #
45
- # The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
52
+ # The zero-based character offset before the folded range ends. If not
53
+ # defined, defaults to the length of the end line.
46
54
  #
47
55
  # @return [number]
48
56
  def end_character
@@ -50,9 +58,10 @@ module LanguageServer
50
58
  end
51
59
 
52
60
  #
53
- # Describes the kind of the folding range such as `comment` or `region`. The kind
54
- # is used to categorize folding ranges and used by commands like 'Fold all comments'. See
55
- # [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
61
+ # Describes the kind of the folding range such as `comment` or `region`.
62
+ # The kind is used to categorize folding ranges and used by commands like
63
+ # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an
64
+ # enumeration of standardized kinds.
56
65
  #
57
66
  # @return [string]
58
67
  def kind
@@ -13,9 +13,10 @@ module LanguageServer
13
13
  end
14
14
 
15
15
  #
16
- # Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
17
- # the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
18
- # capability as well.
16
+ # Whether implementation supports dynamic registration for folding range
17
+ # providers. If this is set to `true` the client supports the new
18
+ # `FoldingRangeRegistrationOptions` return value for the corresponding
19
+ # server capability as well.
19
20
  #
20
21
  # @return [boolean]
21
22
  def dynamic_registration
@@ -23,8 +24,9 @@ module LanguageServer
23
24
  end
24
25
 
25
26
  #
26
- # The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
27
- # hint, servers are free to follow the limit.
27
+ # The maximum number of folding ranges that the client prefers to receive
28
+ # per document. The value serves as a hint, servers are free to follow the
29
+ # limit.
28
30
  #
29
31
  # @return [number]
30
32
  def range_limit
@@ -32,8 +34,9 @@ module LanguageServer
32
34
  end
33
35
 
34
36
  #
35
- # If set, the client signals that it only supports folding complete lines. If set, client will
36
- # ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
37
+ # If set, the client signals that it only supports folding complete lines.
38
+ # If set, client will ignore specified `startCharacter` and `endCharacter`
39
+ # properties in a FoldingRange.
37
40
  #
38
41
  # @return [boolean]
39
42
  def line_folding_only
@@ -17,7 +17,7 @@ module LanguageServer
17
17
  #
18
18
  # The hover's content
19
19
  #
20
- # @return [string | MarkupContent | { language: string; value: string; } | MarkedString[]]
20
+ # @return [MarkupContent | MarkedString | MarkedString[]]
21
21
  def contents
22
22
  attributes.fetch(:contents)
23
23
  end
@@ -20,8 +20,9 @@ module LanguageServer
20
20
  end
21
21
 
22
22
  #
23
- # Client supports the follow content formats for the content
24
- # property. The order describes the preferred format of the client.
23
+ # Client supports the following content formats if the content
24
+ # property refers to a `literal of type MarkupContent`.
25
+ # The order describes the preferred format of the client.
25
26
  #
26
27
  # @return [MarkupKind[]]
27
28
  def content_format
@@ -12,9 +12,9 @@ module LanguageServer
12
12
  end
13
13
 
14
14
  #
15
- # Whether implementation supports dynamic registration. If this is set to `true`
16
- # the client supports the new `ImplementationRegistrationOptions` return value
17
- # for the corresponding server capability as well.
15
+ # Whether implementation supports dynamic registration. If this is set to
16
+ # `true` the client supports the new `ImplementationRegistrationOptions`
17
+ # return value for the corresponding server capability as well.
18
18
  #
19
19
  # @return [boolean]
20
20
  def dynamic_registration
@@ -2,12 +2,13 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  class InitializeParams < WorkDoneProgressParams
5
- def initialize(work_done_token: nil, process_id:, client_info: nil, root_path: nil, root_uri:, initialization_options: nil, capabilities:, trace: nil, workspace_folders: nil)
5
+ def initialize(work_done_token: nil, process_id:, client_info: nil, locale: nil, root_path: nil, root_uri:, initialization_options: nil, capabilities:, trace: nil, workspace_folders: nil)
6
6
  @attributes = {}
7
7
 
8
8
  @attributes[:workDoneToken] = work_done_token if work_done_token
9
9
  @attributes[:processId] = process_id
10
10
  @attributes[:clientInfo] = client_info if client_info
11
+ @attributes[:locale] = locale if locale
11
12
  @attributes[:rootPath] = root_path if root_path
12
13
  @attributes[:rootUri] = root_uri
13
14
  @attributes[:initializationOptions] = initialization_options if initialization_options
@@ -19,9 +20,10 @@ module LanguageServer
19
20
  end
20
21
 
21
22
  #
22
- # The process Id of the parent process that started
23
- # the server. Is null if the process has not been started by another process.
24
- # If the parent process is not alive then the server should exit (see exit notification) its process.
23
+ # The process Id of the parent process that started the server. Is null if
24
+ # the process has not been started by another process. If the parent
25
+ # process is not alive then the server should exit (see exit notification)
26
+ # its process.
25
27
  #
26
28
  # @return [number]
27
29
  def process_id
@@ -36,6 +38,19 @@ module LanguageServer
36
38
  attributes.fetch(:clientInfo)
37
39
  end
38
40
 
41
+ #
42
+ # The locale the client is currently showing the user interface
43
+ # in. This must not necessarily be the locale of the operating
44
+ # system.
45
+ #
46
+ # Uses IETF language tags as the value's syntax
47
+ # (See https://en.wikipedia.org/wiki/IETF_language_tag)
48
+ #
49
+ # @return [string]
50
+ def locale
51
+ attributes.fetch(:locale)
52
+ end
53
+
39
54
  #
40
55
  # The rootPath of the workspace. Is null
41
56
  # if no folder is open.
@@ -74,7 +89,7 @@ module LanguageServer
74
89
  #
75
90
  # The initial trace setting. If omitted trace is disabled ('off').
76
91
  #
77
- # @return ["off" | "messages" | "verbose"]
92
+ # @return [TraceValue]
78
93
  def trace
79
94
  attributes.fetch(:trace)
80
95
  end
@@ -0,0 +1,54 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # A special text edit to provide an insert and a replace operation.
6
+ #
7
+ class InsertReplaceEdit
8
+ def initialize(new_text:, insert:, replace:)
9
+ @attributes = {}
10
+
11
+ @attributes[:newText] = new_text
12
+ @attributes[:insert] = insert
13
+ @attributes[:replace] = replace
14
+
15
+ @attributes.freeze
16
+ end
17
+
18
+ #
19
+ # The string to be inserted.
20
+ #
21
+ # @return [string]
22
+ def new_text
23
+ attributes.fetch(:newText)
24
+ end
25
+
26
+ #
27
+ # The range if the insert is requested
28
+ #
29
+ # @return [Range]
30
+ def insert
31
+ attributes.fetch(:insert)
32
+ end
33
+
34
+ #
35
+ # The range if the replace is requested.
36
+ #
37
+ # @return [Range]
38
+ def replace
39
+ attributes.fetch(:replace)
40
+ end
41
+
42
+ attr_reader :attributes
43
+
44
+ def to_hash
45
+ attributes
46
+ end
47
+
48
+ def to_json(*args)
49
+ to_hash.to_json(*args)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,36 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ class LinkedEditingRangeClientCapabilities
5
+ def initialize(dynamic_registration: nil)
6
+ @attributes = {}
7
+
8
+ @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
9
+
10
+ @attributes.freeze
11
+ end
12
+
13
+ #
14
+ # Whether implementation supports dynamic registration.
15
+ # If this is set to `true` the client supports the new
16
+ # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
17
+ # return value for the corresponding server capability as well.
18
+ #
19
+ # @return [boolean]
20
+ def dynamic_registration
21
+ attributes.fetch(:dynamicRegistration)
22
+ end
23
+
24
+ attr_reader :attributes
25
+
26
+ def to_hash
27
+ attributes
28
+ end
29
+
30
+ def to_json(*args)
31
+ to_hash.to_json(*args)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,25 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ class LinkedEditingRangeOptions < WorkDoneProgressOptions
5
+ def initialize(work_done_progress: nil)
6
+ @attributes = {}
7
+
8
+ @attributes[:workDoneProgress] = work_done_progress if work_done_progress
9
+
10
+ @attributes.freeze
11
+ end
12
+
13
+ attr_reader :attributes
14
+
15
+ def to_hash
16
+ attributes
17
+ end
18
+
19
+ def to_json(*args)
20
+ to_hash.to_json(*args)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end