language_server-protocol 3.16.0.2 → 3.17.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/lib/language_server/protocol/constant/code_action_kind.rb +8 -0
  3. data/lib/language_server/protocol/constant/code_action_trigger_kind.rb +22 -0
  4. data/lib/language_server/protocol/constant/document_diagnostic_report_kind.rb +21 -0
  5. data/lib/language_server/protocol/constant/error_codes.rb +33 -2
  6. data/lib/language_server/protocol/constant/folding_range_kind.rb +24 -0
  7. data/lib/language_server/protocol/constant/{initialize_error.rb → initialize_error_codes.rb} +4 -4
  8. data/lib/language_server/protocol/constant/inlay_hint_kind.rb +19 -0
  9. data/lib/language_server/protocol/constant/moniker_kind.rb +24 -0
  10. data/lib/language_server/protocol/constant/notebook_cell_kind.rb +19 -0
  11. data/lib/language_server/protocol/constant/position_encoding_kind.rb +32 -0
  12. data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +1 -1
  13. data/lib/language_server/protocol/constant/semantic_token_modifiers.rb +18 -0
  14. data/lib/language_server/protocol/constant/semantic_token_types.rb +35 -0
  15. data/lib/language_server/protocol/constant/uniqueness_level.rb +31 -0
  16. data/lib/language_server/protocol/constant.rb +22 -2
  17. data/lib/language_server/protocol/interface/{apply_workspace_edit_response.rb → apply_workspace_edit_result.rb} +2 -2
  18. data/lib/language_server/protocol/interface/call_hierarchy_item.rb +1 -1
  19. data/lib/language_server/protocol/interface/client_capabilities.rb +13 -4
  20. data/lib/language_server/protocol/interface/code_action.rb +1 -1
  21. data/lib/language_server/protocol/interface/code_action_context.rb +10 -1
  22. data/lib/language_server/protocol/interface/code_lens.rb +1 -1
  23. data/lib/language_server/protocol/interface/color_presentation.rb +1 -1
  24. data/lib/language_server/protocol/interface/command.rb +1 -1
  25. data/lib/language_server/protocol/interface/completion_client_capabilities.rb +23 -3
  26. data/lib/language_server/protocol/interface/completion_item.rb +41 -9
  27. data/lib/language_server/protocol/interface/completion_item_label_details.rb +49 -0
  28. data/lib/language_server/protocol/interface/completion_list.rb +24 -2
  29. data/lib/language_server/protocol/interface/completion_options.rb +11 -1
  30. data/lib/language_server/protocol/interface/completion_registration_options.rb +11 -1
  31. data/lib/language_server/protocol/interface/create_file.rb +1 -1
  32. data/lib/language_server/protocol/interface/delete_file.rb +1 -1
  33. data/lib/language_server/protocol/interface/diagnostic_client_capabilities.rb +49 -0
  34. data/lib/language_server/protocol/interface/diagnostic_options.rb +64 -0
  35. data/lib/language_server/protocol/interface/diagnostic_registration_options.rb +84 -0
  36. data/lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb +33 -0
  37. data/lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb +42 -0
  38. data/lib/language_server/protocol/interface/did_change_configuration_params.rb +1 -1
  39. data/lib/language_server/protocol/interface/did_change_notebook_document_params.rb +56 -0
  40. data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +11 -1
  41. data/lib/language_server/protocol/interface/did_close_notebook_document_params.rb +46 -0
  42. data/lib/language_server/protocol/interface/did_open_notebook_document_params.rb +46 -0
  43. data/lib/language_server/protocol/interface/did_save_notebook_document_params.rb +36 -0
  44. data/lib/language_server/protocol/interface/document_diagnostic_params.rb +73 -0
  45. data/lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb +33 -0
  46. data/lib/language_server/protocol/interface/document_link.rb +1 -1
  47. data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +1 -1
  48. data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +9 -4
  49. data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +1 -1
  50. data/lib/language_server/protocol/interface/document_symbol.rb +1 -1
  51. data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +1 -1
  52. data/lib/language_server/protocol/interface/execute_command_params.rb +1 -1
  53. data/lib/language_server/protocol/interface/execution_summary.rb +45 -0
  54. data/lib/language_server/protocol/interface/file_system_watcher.rb +3 -14
  55. data/lib/language_server/protocol/interface/folding_range.rb +12 -1
  56. data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +19 -1
  57. data/lib/language_server/protocol/interface/full_document_diagnostic_report.rb +56 -0
  58. data/lib/language_server/protocol/interface/hover_client_capabilities.rb +1 -1
  59. data/lib/language_server/protocol/interface/hover_result.rb +30 -0
  60. data/lib/language_server/protocol/interface/initialize_error.rb +0 -3
  61. data/lib/language_server/protocol/interface/initialize_params.rb +1 -1
  62. data/lib/language_server/protocol/interface/inlay_hint.rb +122 -0
  63. data/lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb +46 -0
  64. data/lib/language_server/protocol/interface/inlay_hint_label_part.rb +79 -0
  65. data/lib/language_server/protocol/interface/inlay_hint_options.rb +43 -0
  66. data/lib/language_server/protocol/interface/inlay_hint_params.rb +54 -0
  67. data/lib/language_server/protocol/interface/inlay_hint_registration_options.rb +63 -0
  68. data/lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb +42 -0
  69. data/lib/language_server/protocol/interface/inline_value_client_capabilities.rb +37 -0
  70. data/lib/language_server/protocol/interface/inline_value_context.rb +44 -0
  71. data/lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb +52 -0
  72. data/lib/language_server/protocol/interface/inline_value_options.rb +33 -0
  73. data/lib/language_server/protocol/interface/inline_value_params.rb +64 -0
  74. data/lib/language_server/protocol/interface/inline_value_registration_options.rb +53 -0
  75. data/lib/language_server/protocol/interface/inline_value_text.rb +45 -0
  76. data/lib/language_server/protocol/interface/inline_value_variable_lookup.rb +61 -0
  77. data/lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb +42 -0
  78. data/lib/language_server/protocol/interface/linked_editing_ranges.rb +5 -4
  79. data/lib/language_server/protocol/interface/location_link.rb +1 -1
  80. data/lib/language_server/protocol/interface/notebook_cell.rb +69 -0
  81. data/lib/language_server/protocol/interface/notebook_cell_array_change.rb +55 -0
  82. data/lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb +52 -0
  83. data/lib/language_server/protocol/interface/notebook_document.rb +74 -0
  84. data/lib/language_server/protocol/interface/notebook_document_change_event.rb +45 -0
  85. data/lib/language_server/protocol/interface/notebook_document_client_capabilities.rb +36 -0
  86. data/lib/language_server/protocol/interface/notebook_document_filter.rb +79 -0
  87. data/lib/language_server/protocol/interface/notebook_document_identifier.rb +36 -0
  88. data/lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb +48 -0
  89. data/lib/language_server/protocol/interface/notebook_document_sync_options.rb +56 -0
  90. data/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb +56 -0
  91. data/lib/language_server/protocol/interface/position.rb +2 -3
  92. data/lib/language_server/protocol/interface/prepare_rename_params.rb +10 -1
  93. data/lib/language_server/protocol/interface/previous_result_id.rb +46 -0
  94. data/lib/language_server/protocol/interface/registration.rb +1 -1
  95. data/lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb +69 -0
  96. data/lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb +62 -0
  97. data/lib/language_server/protocol/interface/relative_pattern.rb +48 -0
  98. data/lib/language_server/protocol/interface/rename_client_capabilities.rb +1 -1
  99. data/lib/language_server/protocol/interface/rename_file.rb +1 -1
  100. data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +29 -1
  101. data/lib/language_server/protocol/interface/server_capabilities.rb +62 -2
  102. data/lib/language_server/protocol/interface/signature_help.rb +2 -2
  103. data/lib/language_server/protocol/interface/symbol_information.rb +1 -1
  104. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +37 -1
  105. data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
  106. data/lib/language_server/protocol/interface/text_document_sync_options.rb +2 -0
  107. data/lib/language_server/protocol/interface/type_hierarchy_item.rb +102 -0
  108. data/lib/language_server/protocol/interface/type_hierarchy_options.rb +30 -0
  109. data/lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb +51 -0
  110. data/lib/language_server/protocol/interface/type_hierarchy_registration_options.rb +50 -0
  111. data/lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb +49 -0
  112. data/lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb +49 -0
  113. data/lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb +50 -0
  114. data/lib/language_server/protocol/interface/{markdown_client_capabilities.rb → versioned_notebook_document_identifier.rb} +12 -12
  115. data/lib/language_server/protocol/interface/work_done_progress_report.rb +1 -1
  116. data/lib/language_server/protocol/interface/workspace_diagnostic_params.rb +65 -0
  117. data/lib/language_server/protocol/interface/workspace_diagnostic_report.rb +33 -0
  118. data/lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb +33 -0
  119. data/lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb +75 -0
  120. data/lib/language_server/protocol/interface/workspace_symbol.rb +89 -0
  121. data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +14 -3
  122. data/lib/language_server/protocol/interface/workspace_symbol_options.rb +11 -1
  123. data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +11 -1
  124. data/lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb +68 -0
  125. data/lib/language_server/protocol/interface.rb +124 -4
  126. data/lib/language_server/protocol/transport/io/reader.rb +7 -24
  127. data/lib/language_server/protocol/version.rb +1 -1
  128. metadata +75 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb38ed978207a09954b5a1a62b25b5d5ebaec981d82b9486dbf429c2593a9b5d
4
- data.tar.gz: 274301eb1c493d7d408da8b1b723630566a51c803bcc1affe22122ed85e18bba
3
+ metadata.gz: 75bc1de387f04a538c440a27915783886cde11fe737f7db7d614a5c738e5e9a3
4
+ data.tar.gz: aad3bee1927ae7fb47977e3260c9f0066115c7fee4e46e0a918363d6a6d35fe1
5
5
  SHA512:
6
- metadata.gz: 57b0e114a97a7313c59c2f34650967dedde4a93faf0ca9cd5ef33deedfa30c7a6609fb0d8decb33fd3e4ebed94a3948b5c20d0b10e2eb41b4812552f67ae0713
7
- data.tar.gz: 2faf8f34ce05e565828acc2cc06131e0a7112e2574da38e86e44432a17b536c8312c6ea40f7618617c145e9c17358d8ec926f482d89f73a6ce28fc961bad017b
6
+ metadata.gz: 15210c7abcf5a80655bc1b2a54fb27f84db90b7a8b2a740a62bacc8101b74d0b18db1940b894f4f66d4fe758a03f3c2e1aa1f639d6db1598eb0991885f63b7ca
7
+ data.tar.gz: 42b3199685478fa7cf436a448d0c0f9aa0278d73b0c61812bcd40eab7034cc8ef23208fb93492277be33046bada12797959eb89297d7a3769e7eabae66999bd5
@@ -71,6 +71,14 @@ module LanguageServer
71
71
  # `source.organizeImports`.
72
72
  #
73
73
  SOURCE_ORGANIZE_IMPORTS = 'source.organizeImports'
74
+ #
75
+ # Base kind for a 'fix all' source action: `source.fixAll`.
76
+ #
77
+ # 'Fix all' actions automatically fix errors that have a clear fix that
78
+ # do not require user input. They should not suppress errors or perform
79
+ # unsafe fixes such as generating new types or classes.
80
+ #
81
+ SOURCE_FIX_ALL = 'source.fixAll'
74
82
  end
75
83
  end
76
84
  end
@@ -0,0 +1,22 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # The reason why code actions were requested.
6
+ #
7
+ module CodeActionTriggerKind
8
+ #
9
+ # Code actions were explicitly requested by the user or by an extension.
10
+ #
11
+ INVOKED = 1
12
+ #
13
+ # Code actions were requested automatically.
14
+ #
15
+ # This typically happens when current selection in a file changes, but can
16
+ # also be triggered when file content changes.
17
+ #
18
+ AUTOMATIC = 2
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,21 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # The document diagnostic report kinds.
6
+ #
7
+ module DocumentDiagnosticReportKind
8
+ #
9
+ # A diagnostic report with a full
10
+ # set of problems.
11
+ #
12
+ FULL = 'full'
13
+ #
14
+ # A report indicating that the last
15
+ # returned report is still accurate.
16
+ #
17
+ UNCHANGED = 'unchanged'
18
+ end
19
+ end
20
+ end
21
+ end
@@ -8,7 +8,7 @@ module LanguageServer
8
8
  INVALID_PARAMS = -32602
9
9
  INTERNAL_ERROR = -32603
10
10
  #
11
- # This is the start range of JSON RPC reserved error codes.
11
+ # This is the start range of JSON-RPC reserved error codes.
12
12
  # It doesn't denote a real error code. No LSP error codes should
13
13
  # be defined between the start and end range. For backwards
14
14
  # compatibility the `ServerNotInitialized` and the `UnknownErrorCode`
@@ -16,10 +16,14 @@ module LanguageServer
16
16
  #
17
17
  JSONRPC_RESERVED_ERROR_RANGE_START = -32099
18
18
  SERVER_ERROR_START = JSONRPC_RESERVED_ERROR_RANGE_START
19
+ #
20
+ # Error code indicating that a server received a notification or
21
+ # request before the server has received the `initialize` request.
22
+ #
19
23
  SERVER_NOT_INITIALIZED = -32002
20
24
  UNKNOWN_ERROR_CODE = -32001
21
25
  #
22
- # This is the start range of JSON RPC reserved error codes.
26
+ # This is the end range of JSON-RPC reserved error codes.
23
27
  # It doesn't denote a real error code.
24
28
  #
25
29
  JSONRPC_RESERVED_ERROR_RANGE_END = -32000
@@ -29,7 +33,34 @@ module LanguageServer
29
33
  # It doesn't denote a real error code.
30
34
  #
31
35
  LSP_RESERVED_ERROR_RANGE_START = -32899
36
+ #
37
+ # A request failed but it was syntactically correct, e.g the
38
+ # method name was known and the parameters were valid. The error
39
+ # message should contain human readable information about why
40
+ # the request failed.
41
+ #
42
+ REQUEST_FAILED = -32803
43
+ #
44
+ # The server cancelled the request. This error code should
45
+ # only be used for requests that explicitly support being
46
+ # server cancellable.
47
+ #
48
+ SERVER_CANCELLED = -32802
49
+ #
50
+ # The server detected that the content of a document got
51
+ # modified outside normal conditions. A server should
52
+ # NOT send this error code if it detects a content change
53
+ # in it unprocessed messages. The result even computed
54
+ # on an older state might still be useful for the client.
55
+ #
56
+ # If a client decides that a result is not of any use anymore
57
+ # the client should cancel the request.
58
+ #
32
59
  CONTENT_MODIFIED = -32801
60
+ #
61
+ # The client has canceled a request and a server as detected
62
+ # the cancel.
63
+ #
33
64
  REQUEST_CANCELLED = -32800
34
65
  #
35
66
  # This is the end range of LSP reserved error codes.
@@ -0,0 +1,24 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # A set of predefined range kinds.
6
+ # The type is a string since the value set is extensible
7
+ #
8
+ module FoldingRangeKind
9
+ #
10
+ # Folding range for a comment
11
+ #
12
+ COMMENT = 'comment'
13
+ #
14
+ # Folding range for a imports or includes
15
+ #
16
+ IMPORTS = 'imports'
17
+ #
18
+ # Folding range for a region (e.g. `#region`)
19
+ #
20
+ REGION = 'region'
21
+ end
22
+ end
23
+ end
24
+ end
@@ -2,12 +2,12 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Constant
4
4
  #
5
- # Known error codes for an `InitializeError`;
5
+ # Known error codes for an `InitializeErrorCodes`;
6
6
  #
7
- module InitializeError
7
+ module InitializeErrorCodes
8
8
  #
9
- # If the protocol version provided by the client can't be handled by the
10
- # server.
9
+ # If the protocol version provided by the client can't be handled by
10
+ # the server.
11
11
  #
12
12
  UNKNOWN_PROTOCOL_VERSION = 1
13
13
  end
@@ -0,0 +1,19 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # Inlay hint kinds.
6
+ #
7
+ module InlayHintKind
8
+ #
9
+ # An inlay hint that for a type annotation.
10
+ #
11
+ TYPE = 1
12
+ #
13
+ # An inlay hint that is for a parameter.
14
+ #
15
+ PARAMETER = 2
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,24 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # The moniker kind.
6
+ #
7
+ module MonikerKind
8
+ #
9
+ # The moniker represent a symbol that is imported into a project
10
+ #
11
+ IMPORT = 'import'
12
+ #
13
+ # The moniker represents a symbol that is exported from a project
14
+ #
15
+ EXPORT = 'export'
16
+ #
17
+ # The moniker represents a symbol that is local to a project (e.g. a local
18
+ # variable of a function, a class not visible outside the project, ...)
19
+ #
20
+ LOCAL = 'local'
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,19 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # A notebook cell kind.
6
+ #
7
+ module NotebookCellKind
8
+ #
9
+ # A markup-cell is formatted source that is used for display.
10
+ #
11
+ MARKUP = 1
12
+ #
13
+ # A code-cell is source code.
14
+ #
15
+ CODE = 2
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,32 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # A type indicating how positions are encoded,
6
+ # specifically what column offsets mean.
7
+ # A set of predefined position encoding kinds.
8
+ #
9
+ module PositionEncodingKind
10
+ #
11
+ # Character offsets count UTF-8 code units.
12
+ #
13
+ UTF8 = 'utf-8'
14
+ #
15
+ # Character offsets count UTF-16 code units.
16
+ #
17
+ # This is the default and must always be supported
18
+ # by servers
19
+ #
20
+ UTF16 = 'utf-16'
21
+ #
22
+ # Character offsets count UTF-32 code units.
23
+ #
24
+ # Implementation note: these are the same as Unicode code points,
25
+ # so this `PositionEncodingKind` may also be used for an
26
+ # encoding-agnostic representation of character offsets.
27
+ #
28
+ UTF32 = 'utf-32'
29
+ end
30
+ end
31
+ end
32
+ end
@@ -4,7 +4,7 @@ module LanguageServer
4
4
  module PrepareSupportDefaultBehavior
5
5
  #
6
6
  # The client's default behavior is to select the identifier
7
- # according the to language's syntax rule.
7
+ # according to the language's syntax rule.
8
8
  #
9
9
  IDENTIFIER = 1
10
10
  end
@@ -0,0 +1,18 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ module SemanticTokenModifiers
5
+ DECLARATION = 'declaration'
6
+ DEFINITION = 'definition'
7
+ READONLY = 'readonly'
8
+ STATIC = 'static'
9
+ DEPRECATED = 'deprecated'
10
+ ABSTRACT = 'abstract'
11
+ ASYNC = 'async'
12
+ MODIFICATION = 'modification'
13
+ DOCUMENTATION = 'documentation'
14
+ DEFAULT_LIBRARY = 'defaultLibrary'
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,35 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ module SemanticTokenTypes
5
+ NAMESPACE = 'namespace'
6
+ #
7
+ # Represents a generic type. Acts as a fallback for types which
8
+ # can't be mapped to a specific type like class or enum.
9
+ #
10
+ TYPE = 'type'
11
+ CLASS = 'class'
12
+ ENUM = 'enum'
13
+ INTERFACE = 'interface'
14
+ STRUCT = 'struct'
15
+ TYPE_PARAMETER = 'typeParameter'
16
+ PARAMETER = 'parameter'
17
+ VARIABLE = 'variable'
18
+ PROPERTY = 'property'
19
+ ENUM_MEMBER = 'enumMember'
20
+ EVENT = 'event'
21
+ FUNCTION = 'function'
22
+ METHOD = 'method'
23
+ MACRO = 'macro'
24
+ KEYWORD = 'keyword'
25
+ MODIFIER = 'modifier'
26
+ COMMENT = 'comment'
27
+ STRING = 'string'
28
+ NUMBER = 'number'
29
+ REGEXP = 'regexp'
30
+ OPERATOR = 'operator'
31
+ DECORATOR = 'decorator'
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,31 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # Moniker uniqueness level to define scope of the moniker.
6
+ #
7
+ module UniquenessLevel
8
+ #
9
+ # The moniker is only unique inside a document
10
+ #
11
+ DOCUMENT = 'document'
12
+ #
13
+ # The moniker is unique inside a project for which a dump got created
14
+ #
15
+ PROJECT = 'project'
16
+ #
17
+ # The moniker is unique inside the group to which a project belongs
18
+ #
19
+ GROUP = 'group'
20
+ #
21
+ # The moniker is unique inside the moniker scheme.
22
+ #
23
+ SCHEME = 'scheme'
24
+ #
25
+ # The moniker is globally unique
26
+ #
27
+ GLOBAL = 'global'
28
+ end
29
+ end
30
+ end
31
+ end
@@ -2,23 +2,32 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Constant
4
4
  autoload :CodeActionKind, "language_server/protocol/constant/code_action_kind"
5
+ autoload :CodeActionTriggerKind, "language_server/protocol/constant/code_action_trigger_kind"
5
6
  autoload :CompletionItemKind, "language_server/protocol/constant/completion_item_kind"
6
7
  autoload :CompletionItemTag, "language_server/protocol/constant/completion_item_tag"
7
8
  autoload :CompletionTriggerKind, "language_server/protocol/constant/completion_trigger_kind"
8
9
  autoload :DiagnosticSeverity, "language_server/protocol/constant/diagnostic_severity"
9
10
  autoload :DiagnosticTag, "language_server/protocol/constant/diagnostic_tag"
11
+ autoload :DocumentDiagnosticReportKind, "language_server/protocol/constant/document_diagnostic_report_kind"
10
12
  autoload :DocumentHighlightKind, "language_server/protocol/constant/document_highlight_kind"
11
13
  autoload :ErrorCodes, "language_server/protocol/constant/error_codes"
12
14
  autoload :FailureHandlingKind, "language_server/protocol/constant/failure_handling_kind"
13
15
  autoload :FileChangeType, "language_server/protocol/constant/file_change_type"
14
16
  autoload :FileOperationPatternKind, "language_server/protocol/constant/file_operation_pattern_kind"
15
- autoload :InitializeError, "language_server/protocol/constant/initialize_error"
17
+ autoload :FoldingRangeKind, "language_server/protocol/constant/folding_range_kind"
18
+ autoload :InitializeErrorCodes, "language_server/protocol/constant/initialize_error_codes"
19
+ autoload :InlayHintKind, "language_server/protocol/constant/inlay_hint_kind"
16
20
  autoload :InsertTextFormat, "language_server/protocol/constant/insert_text_format"
17
21
  autoload :InsertTextMode, "language_server/protocol/constant/insert_text_mode"
18
22
  autoload :MarkupKind, "language_server/protocol/constant/markup_kind"
19
23
  autoload :MessageType, "language_server/protocol/constant/message_type"
24
+ autoload :MonikerKind, "language_server/protocol/constant/moniker_kind"
25
+ autoload :NotebookCellKind, "language_server/protocol/constant/notebook_cell_kind"
26
+ autoload :PositionEncodingKind, "language_server/protocol/constant/position_encoding_kind"
20
27
  autoload :PrepareSupportDefaultBehavior, "language_server/protocol/constant/prepare_support_default_behavior"
21
28
  autoload :ResourceOperationKind, "language_server/protocol/constant/resource_operation_kind"
29
+ autoload :SemanticTokenModifiers, "language_server/protocol/constant/semantic_token_modifiers"
30
+ autoload :SemanticTokenTypes, "language_server/protocol/constant/semantic_token_types"
22
31
  autoload :SignatureHelpTriggerKind, "language_server/protocol/constant/signature_help_trigger_kind"
23
32
  autoload :SymbolKind, "language_server/protocol/constant/symbol_kind"
24
33
  autoload :SymbolTag, "language_server/protocol/constant/symbol_tag"
@@ -26,26 +35,36 @@ module LanguageServer
26
35
  autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
27
36
  autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
28
37
  autoload :TokenFormat, "language_server/protocol/constant/token_format"
38
+ autoload :UniquenessLevel, "language_server/protocol/constant/uniqueness_level"
29
39
  autoload :WatchKind, "language_server/protocol/constant/watch_kind"
30
40
 
31
41
  require "language_server/protocol/constant/code_action_kind"
42
+ require "language_server/protocol/constant/code_action_trigger_kind"
32
43
  require "language_server/protocol/constant/completion_item_kind"
33
44
  require "language_server/protocol/constant/completion_item_tag"
34
45
  require "language_server/protocol/constant/completion_trigger_kind"
35
46
  require "language_server/protocol/constant/diagnostic_severity"
36
47
  require "language_server/protocol/constant/diagnostic_tag"
48
+ require "language_server/protocol/constant/document_diagnostic_report_kind"
37
49
  require "language_server/protocol/constant/document_highlight_kind"
38
50
  require "language_server/protocol/constant/error_codes"
39
51
  require "language_server/protocol/constant/failure_handling_kind"
40
52
  require "language_server/protocol/constant/file_change_type"
41
53
  require "language_server/protocol/constant/file_operation_pattern_kind"
42
- require "language_server/protocol/constant/initialize_error"
54
+ require "language_server/protocol/constant/folding_range_kind"
55
+ require "language_server/protocol/constant/initialize_error_codes"
56
+ require "language_server/protocol/constant/inlay_hint_kind"
43
57
  require "language_server/protocol/constant/insert_text_format"
44
58
  require "language_server/protocol/constant/insert_text_mode"
45
59
  require "language_server/protocol/constant/markup_kind"
46
60
  require "language_server/protocol/constant/message_type"
61
+ require "language_server/protocol/constant/moniker_kind"
62
+ require "language_server/protocol/constant/notebook_cell_kind"
63
+ require "language_server/protocol/constant/position_encoding_kind"
47
64
  require "language_server/protocol/constant/prepare_support_default_behavior"
48
65
  require "language_server/protocol/constant/resource_operation_kind"
66
+ require "language_server/protocol/constant/semantic_token_modifiers"
67
+ require "language_server/protocol/constant/semantic_token_types"
49
68
  require "language_server/protocol/constant/signature_help_trigger_kind"
50
69
  require "language_server/protocol/constant/symbol_kind"
51
70
  require "language_server/protocol/constant/symbol_tag"
@@ -53,6 +72,7 @@ module LanguageServer
53
72
  require "language_server/protocol/constant/text_document_sync_kind"
54
73
  require "language_server/protocol/constant/text_document_sync_kind"
55
74
  require "language_server/protocol/constant/token_format"
75
+ require "language_server/protocol/constant/uniqueness_level"
56
76
  require "language_server/protocol/constant/watch_kind"
57
77
  end
58
78
  end
@@ -1,7 +1,7 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- class ApplyWorkspaceEditResponse
4
+ class ApplyWorkspaceEditResult
5
5
  def initialize(applied:, failure_reason: nil, failed_change: nil)
6
6
  @attributes = {}
7
7
 
@@ -33,7 +33,7 @@ module LanguageServer
33
33
  #
34
34
  # Depending on the client's failure handling strategy `failedChange`
35
35
  # might contain the index of the change that failed. This property is
36
- # only available if the client signals a `failureHandlingStrategy`
36
+ # only available if the client signals a `failureHandling` strategy
37
37
  # in its client capabilities.
38
38
  #
39
39
  # @return [number]
@@ -28,7 +28,7 @@ module LanguageServer
28
28
  #
29
29
  # The kind of this item.
30
30
  #
31
- # @return [any]
31
+ # @return [SymbolKind]
32
32
  def kind
33
33
  attributes.fetch(:kind)
34
34
  end
@@ -2,11 +2,12 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  class ClientCapabilities
5
- def initialize(workspace: nil, text_document: nil, window: nil, general: nil, experimental: nil)
5
+ def initialize(workspace: nil, text_document: nil, notebook_document: nil, window: nil, general: nil, experimental: nil)
6
6
  @attributes = {}
7
7
 
8
8
  @attributes[:workspace] = workspace if workspace
9
9
  @attributes[:textDocument] = text_document if text_document
10
+ @attributes[:notebookDocument] = notebook_document if notebook_document
10
11
  @attributes[:window] = window if window
11
12
  @attributes[:general] = general if general
12
13
  @attributes[:experimental] = experimental if experimental
@@ -17,7 +18,7 @@ module LanguageServer
17
18
  #
18
19
  # Workspace specific client capabilities.
19
20
  #
20
- # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 7 more ...; fileOperations?: { ...; }; }]
21
+ # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }]
21
22
  def workspace
22
23
  attributes.fetch(:workspace)
23
24
  end
@@ -30,6 +31,14 @@ module LanguageServer
30
31
  attributes.fetch(:textDocument)
31
32
  end
32
33
 
34
+ #
35
+ # Capabilities specific to the notebook document support.
36
+ #
37
+ # @return [NotebookDocumentClientCapabilities]
38
+ def notebook_document
39
+ attributes.fetch(:notebookDocument)
40
+ end
41
+
33
42
  #
34
43
  # Window specific client capabilities.
35
44
  #
@@ -41,7 +50,7 @@ module LanguageServer
41
50
  #
42
51
  # General client capabilities.
43
52
  #
44
- # @return [{ regularExpressions?: RegularExpressionsClientCapabilities; markdown?: MarkdownClientCapabilities; }]
53
+ # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }]
45
54
  def general
46
55
  attributes.fetch(:general)
47
56
  end
@@ -49,7 +58,7 @@ module LanguageServer
49
58
  #
50
59
  # Experimental client capabilities.
51
60
  #
52
- # @return [any]
61
+ # @return [LSPAny]
53
62
  def experimental
54
63
  attributes.fetch(:experimental)
55
64
  end
@@ -107,7 +107,7 @@ module LanguageServer
107
107
  # A data entry field that is preserved on a code action between
108
108
  # a `textDocument/codeAction` and a `codeAction/resolve` request.
109
109
  #
110
- # @return [any]
110
+ # @return [LSPAny]
111
111
  def data
112
112
  attributes.fetch(:data)
113
113
  end
@@ -6,11 +6,12 @@ module LanguageServer
6
6
  # a code action is run.
7
7
  #
8
8
  class CodeActionContext
9
- def initialize(diagnostics:, only: nil)
9
+ def initialize(diagnostics:, only: nil, trigger_kind: nil)
10
10
  @attributes = {}
11
11
 
12
12
  @attributes[:diagnostics] = diagnostics
13
13
  @attributes[:only] = only if only
14
+ @attributes[:triggerKind] = trigger_kind if trigger_kind
14
15
 
15
16
  @attributes.freeze
16
17
  end
@@ -39,6 +40,14 @@ module LanguageServer
39
40
  attributes.fetch(:only)
40
41
  end
41
42
 
43
+ #
44
+ # The reason why code actions were requested.
45
+ #
46
+ # @return [CodeActionTriggerKind]
47
+ def trigger_kind
48
+ attributes.fetch(:triggerKind)
49
+ end
50
+
42
51
  attr_reader :attributes
43
52
 
44
53
  def to_hash
@@ -41,7 +41,7 @@ module LanguageServer
41
41
  # A data entry field that is preserved on a code lens item between
42
42
  # a code lens and a code lens resolve request.
43
43
  #
44
- # @return [any]
44
+ # @return [LSPAny]
45
45
  def data
46
46
  attributes.fetch(:data)
47
47
  end
@@ -24,7 +24,7 @@ module LanguageServer
24
24
 
25
25
  #
26
26
  # An [edit](#TextEdit) which is applied to a document when selecting
27
- # this presentation for the color. When `falsy` the
27
+ # this presentation for the color. When `falsy` the
28
28
  # [label](#ColorPresentation.label) is used.
29
29
  #
30
30
  # @return [TextEdit]
@@ -32,7 +32,7 @@ module LanguageServer
32
32
  # Arguments that the command handler should be
33
33
  # invoked with.
34
34
  #
35
- # @return [any[]]
35
+ # @return [LSPAny[]]
36
36
  def arguments
37
37
  attributes.fetch(:arguments)
38
38
  end