puppet-editor-services 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +510 -0
  3. data/CODEOWNERS +2 -0
  4. data/CODE_OF_CONDUCT.md +46 -0
  5. data/CONTRIBUTING.md +54 -0
  6. data/Gemfile +53 -0
  7. data/LICENSE +201 -0
  8. data/README.md +308 -0
  9. data/Rakefile +185 -0
  10. data/bin/puppet-debugserver +8 -0
  11. data/bin/puppet-languageserver +7 -0
  12. data/bin/puppet-languageserver-sidecar +7 -0
  13. data/lib/dsp/dsp.rb +7 -0
  14. data/lib/dsp/dsp_base.rb +62 -0
  15. data/lib/dsp/dsp_protocol.rb +4619 -0
  16. data/lib/lsp/lsp.rb +10 -0
  17. data/lib/lsp/lsp_base.rb +63 -0
  18. data/lib/lsp/lsp_custom.rb +170 -0
  19. data/lib/lsp/lsp_enums.rb +143 -0
  20. data/lib/lsp/lsp_protocol.rb +2785 -0
  21. data/lib/lsp/lsp_protocol_callhierarchy.proposed.rb +239 -0
  22. data/lib/lsp/lsp_protocol_colorprovider.rb +100 -0
  23. data/lib/lsp/lsp_protocol_configuration.rb +82 -0
  24. data/lib/lsp/lsp_protocol_declaration.rb +73 -0
  25. data/lib/lsp/lsp_protocol_foldingrange.rb +129 -0
  26. data/lib/lsp/lsp_protocol_implementation.rb +75 -0
  27. data/lib/lsp/lsp_protocol_progress.rb +200 -0
  28. data/lib/lsp/lsp_protocol_selectionrange.rb +79 -0
  29. data/lib/lsp/lsp_protocol_sematictokens.proposed.rb +340 -0
  30. data/lib/lsp/lsp_protocol_typedefinition.rb +75 -0
  31. data/lib/lsp/lsp_protocol_workspacefolders.rb +174 -0
  32. data/lib/lsp/lsp_types.rb +1534 -0
  33. data/lib/puppet-debugserver/debug_session/break_points.rb +137 -0
  34. data/lib/puppet-debugserver/debug_session/flow_control.rb +161 -0
  35. data/lib/puppet-debugserver/debug_session/hook_handlers.rb +295 -0
  36. data/lib/puppet-debugserver/debug_session/puppet_session_run_mode.rb +66 -0
  37. data/lib/puppet-debugserver/debug_session/puppet_session_state.rb +122 -0
  38. data/lib/puppet-debugserver/hooks.rb +132 -0
  39. data/lib/puppet-debugserver/message_handler.rb +277 -0
  40. data/lib/puppet-debugserver/puppet_debug_session.rb +541 -0
  41. data/lib/puppet-debugserver/puppet_monkey_patches.rb +118 -0
  42. data/lib/puppet-languageserver/client_session_state.rb +119 -0
  43. data/lib/puppet-languageserver/crash_dump.rb +50 -0
  44. data/lib/puppet-languageserver/epp/validation_provider.rb +34 -0
  45. data/lib/puppet-languageserver/facter_helper.rb +25 -0
  46. data/lib/puppet-languageserver/global_queues/sidecar_queue.rb +205 -0
  47. data/lib/puppet-languageserver/global_queues/single_instance_queue.rb +126 -0
  48. data/lib/puppet-languageserver/global_queues/validation_queue.rb +102 -0
  49. data/lib/puppet-languageserver/global_queues.rb +16 -0
  50. data/lib/puppet-languageserver/manifest/completion_provider.rb +331 -0
  51. data/lib/puppet-languageserver/manifest/definition_provider.rb +99 -0
  52. data/lib/puppet-languageserver/manifest/document_symbol_provider.rb +228 -0
  53. data/lib/puppet-languageserver/manifest/folding_provider.rb +226 -0
  54. data/lib/puppet-languageserver/manifest/format_on_type_provider.rb +143 -0
  55. data/lib/puppet-languageserver/manifest/hover_provider.rb +221 -0
  56. data/lib/puppet-languageserver/manifest/signature_provider.rb +169 -0
  57. data/lib/puppet-languageserver/manifest/validation_provider.rb +127 -0
  58. data/lib/puppet-languageserver/message_handler.rb +462 -0
  59. data/lib/puppet-languageserver/providers.rb +18 -0
  60. data/lib/puppet-languageserver/puppet_helper.rb +108 -0
  61. data/lib/puppet-languageserver/puppet_lexer_helper.rb +55 -0
  62. data/lib/puppet-languageserver/puppet_monkey_patches.rb +39 -0
  63. data/lib/puppet-languageserver/puppet_parser_helper.rb +212 -0
  64. data/lib/puppet-languageserver/puppetfile/validation_provider.rb +185 -0
  65. data/lib/puppet-languageserver/server_capabilities.rb +48 -0
  66. data/lib/puppet-languageserver/session_state/document_store.rb +272 -0
  67. data/lib/puppet-languageserver/session_state/language_client.rb +239 -0
  68. data/lib/puppet-languageserver/session_state/object_cache.rb +162 -0
  69. data/lib/puppet-languageserver/sidecar_protocol.rb +532 -0
  70. data/lib/puppet-languageserver/uri_helper.rb +46 -0
  71. data/lib/puppet-languageserver-sidecar/cache/base.rb +36 -0
  72. data/lib/puppet-languageserver-sidecar/cache/filesystem.rb +111 -0
  73. data/lib/puppet-languageserver-sidecar/cache/null.rb +27 -0
  74. data/lib/puppet-languageserver-sidecar/facter_helper.rb +41 -0
  75. data/lib/puppet-languageserver-sidecar/puppet_environment_monkey_patches.rb +52 -0
  76. data/lib/puppet-languageserver-sidecar/puppet_helper.rb +281 -0
  77. data/lib/puppet-languageserver-sidecar/puppet_modulepath_monkey_patches.rb +146 -0
  78. data/lib/puppet-languageserver-sidecar/puppet_monkey_patches.rb +9 -0
  79. data/lib/puppet-languageserver-sidecar/puppet_parser_helper.rb +77 -0
  80. data/lib/puppet-languageserver-sidecar/puppet_strings_helper.rb +399 -0
  81. data/lib/puppet-languageserver-sidecar/puppet_strings_monkey_patches.rb +16 -0
  82. data/lib/puppet-languageserver-sidecar/sidecar_protocol_extensions.rb +16 -0
  83. data/lib/puppet-languageserver-sidecar/workspace.rb +89 -0
  84. data/lib/puppet_debugserver.rb +164 -0
  85. data/lib/puppet_editor_services/connection/base.rb +62 -0
  86. data/lib/puppet_editor_services/connection/stdio.rb +25 -0
  87. data/lib/puppet_editor_services/connection/tcp.rb +34 -0
  88. data/lib/puppet_editor_services/handler/base.rb +16 -0
  89. data/lib/puppet_editor_services/handler/debug_adapter.rb +63 -0
  90. data/lib/puppet_editor_services/handler/json_rpc.rb +133 -0
  91. data/lib/puppet_editor_services/logging.rb +45 -0
  92. data/lib/puppet_editor_services/protocol/base.rb +27 -0
  93. data/lib/puppet_editor_services/protocol/debug_adapter.rb +135 -0
  94. data/lib/puppet_editor_services/protocol/debug_adapter_messages.rb +171 -0
  95. data/lib/puppet_editor_services/protocol/json_rpc.rb +241 -0
  96. data/lib/puppet_editor_services/protocol/json_rpc_messages.rb +200 -0
  97. data/lib/puppet_editor_services/server/base.rb +42 -0
  98. data/lib/puppet_editor_services/server/stdio.rb +85 -0
  99. data/lib/puppet_editor_services/server/tcp.rb +349 -0
  100. data/lib/puppet_editor_services/server.rb +15 -0
  101. data/lib/puppet_editor_services/version.rb +36 -0
  102. data/lib/puppet_editor_services.rb +8 -0
  103. data/lib/puppet_languageserver.rb +263 -0
  104. data/lib/puppet_languageserver_sidecar.rb +361 -0
  105. data/puppet-debugserver +11 -0
  106. data/puppet-editor-services.gemspec +29 -0
  107. data/puppet-languageserver +15 -0
  108. data/puppet-languageserver-sidecar +14 -0
  109. metadata +240 -0
@@ -0,0 +1,200 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DO NOT MODIFY. This file is built automatically
4
+ # LSP Protocol: vscode-languageserver-protocol/lib/protocol.progress.d.ts
5
+
6
+ module LSP
7
+ # export interface WorkDoneProgressClientCapabilities {
8
+ # /**
9
+ # * Window specific client capabilities.
10
+ # */
11
+ # window?: {
12
+ # /**
13
+ # * Whether client supports handling progress notifications. If set servers are allowed to
14
+ # * report in `workDoneProgress` property in the request specific server capabilities.
15
+ # *
16
+ # * Since 3.15.0
17
+ # */
18
+ # workDoneProgress?: boolean;
19
+ # };
20
+ # }
21
+ class WorkDoneProgressClientCapabilities < LSPBase
22
+ attr_accessor :window # type: {
23
+
24
+ # /**
25
+ # * Whether client supports handling progress notifications. If set servers are allowed to
26
+ # * report in `workDoneProgress` property in the request specific server capabilities.
27
+ # *
28
+ # * Since 3.15.0
29
+ # */
30
+ # workDoneProgress?: boolean;
31
+ # }
32
+
33
+ def initialize(initial_hash = nil)
34
+ super
35
+ @optional_method_names = %i[window]
36
+ end
37
+
38
+ def from_h!(value)
39
+ value = {} if value.nil?
40
+ self.window = value['window'] # Unknown type
41
+ self
42
+ end
43
+ end
44
+
45
+ # export interface WorkDoneProgressBegin {
46
+ # kind: 'begin';
47
+ # /**
48
+ # * Mandatory title of the progress operation. Used to briefly inform about
49
+ # * the kind of operation being performed.
50
+ # *
51
+ # * Examples: "Indexing" or "Linking dependencies".
52
+ # */
53
+ # title: string;
54
+ # /**
55
+ # * Controls if a cancel button should show to allow the user to cancel the
56
+ # * long running operation. Clients that don't support cancellation are allowed
57
+ # * to ignore the setting.
58
+ # */
59
+ # cancellable?: boolean;
60
+ # /**
61
+ # * Optional, more detailed associated progress message. Contains
62
+ # * complementary information to the `title`.
63
+ # *
64
+ # * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
65
+ # * If unset, the previous progress message (if any) is still valid.
66
+ # */
67
+ # message?: string;
68
+ # /**
69
+ # * Optional progress percentage to display (value 100 is considered 100%).
70
+ # * If not provided infinite progress is assumed and clients are allowed
71
+ # * to ignore the `percentage` value in subsequent in report notifications.
72
+ # *
73
+ # * The value should be steadily rising. Clients are free to ignore values
74
+ # * that are not following this rule.
75
+ # */
76
+ # percentage?: number;
77
+ # }
78
+ class WorkDoneProgressBegin < LSPBase
79
+ attr_accessor :kind, :title, :cancellable, :message, :percentage # type: string with value 'begin' # type: string # type: boolean # type: string # type: number
80
+
81
+ def initialize(initial_hash = nil)
82
+ super
83
+ @optional_method_names = %i[cancellable message percentage]
84
+ end
85
+
86
+ def from_h!(value)
87
+ value = {} if value.nil?
88
+ self.kind = value['kind'] # Unknown type
89
+ self.title = value['title']
90
+ self.cancellable = value['cancellable'] # Unknown type
91
+ self.message = value['message']
92
+ self.percentage = value['percentage']
93
+ self
94
+ end
95
+ end
96
+
97
+ # export interface WorkDoneProgressReport {
98
+ # kind: 'report';
99
+ # /**
100
+ # * Controls enablement state of a cancel button. This property is only valid if a cancel
101
+ # * button got requested in the `WorkDoneProgressStart` payload.
102
+ # *
103
+ # * Clients that don't support cancellation or don't support control the button's
104
+ # * enablement state are allowed to ignore the setting.
105
+ # */
106
+ # cancellable?: boolean;
107
+ # /**
108
+ # * Optional, more detailed associated progress message. Contains
109
+ # * complementary information to the `title`.
110
+ # *
111
+ # * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
112
+ # * If unset, the previous progress message (if any) is still valid.
113
+ # */
114
+ # message?: string;
115
+ # /**
116
+ # * Optional progress percentage to display (value 100 is considered 100%).
117
+ # * If not provided infinite progress is assumed and clients are allowed
118
+ # * to ignore the `percentage` value in subsequent in report notifications.
119
+ # *
120
+ # * The value should be steadily rising. Clients are free to ignore values
121
+ # * that are not following this rule.
122
+ # */
123
+ # percentage?: number;
124
+ # }
125
+ class WorkDoneProgressReport < LSPBase
126
+ attr_accessor :kind, :cancellable, :message, :percentage # type: string with value 'report' # type: boolean # type: string # type: number
127
+
128
+ def initialize(initial_hash = nil)
129
+ super
130
+ @optional_method_names = %i[cancellable message percentage]
131
+ end
132
+
133
+ def from_h!(value)
134
+ value = {} if value.nil?
135
+ self.kind = value['kind'] # Unknown type
136
+ self.cancellable = value['cancellable'] # Unknown type
137
+ self.message = value['message']
138
+ self.percentage = value['percentage']
139
+ self
140
+ end
141
+ end
142
+
143
+ # export interface WorkDoneProgressEnd {
144
+ # kind: 'end';
145
+ # /**
146
+ # * Optional, a final message indicating to for example indicate the outcome
147
+ # * of the operation.
148
+ # */
149
+ # message?: string;
150
+ # }
151
+ class WorkDoneProgressEnd < LSPBase
152
+ attr_accessor :kind, :message # type: string with value 'end' # type: string
153
+
154
+ def initialize(initial_hash = nil)
155
+ super
156
+ @optional_method_names = %i[message]
157
+ end
158
+
159
+ def from_h!(value)
160
+ value = {} if value.nil?
161
+ self.kind = value['kind'] # Unknown type
162
+ self.message = value['message']
163
+ self
164
+ end
165
+ end
166
+
167
+ # export interface WorkDoneProgressCreateParams {
168
+ # /**
169
+ # * The token to be used to report progress.
170
+ # */
171
+ # token: ProgressToken;
172
+ # }
173
+ class WorkDoneProgressCreateParams < LSPBase
174
+ attr_accessor :token # type: ProgressToken
175
+
176
+ def from_h!(value)
177
+ value = {} if value.nil?
178
+ self.token = value['token'] # Unknown type
179
+ self
180
+ end
181
+ end
182
+
183
+ # export interface WorkDoneProgressCancelParams {
184
+ # /**
185
+ # * The token to be used to report progress.
186
+ # */
187
+ # token: ProgressToken;
188
+ # }
189
+ class WorkDoneProgressCancelParams < LSPBase
190
+ attr_accessor :token # type: ProgressToken
191
+
192
+ def from_h!(value)
193
+ value = {} if value.nil?
194
+ self.token = value['token'] # Unknown type
195
+ self
196
+ end
197
+ end
198
+ end
199
+
200
+ # rubocop:enable Style/AsciiComments
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DO NOT MODIFY. This file is built automatically
4
+ # LSP Protocol: vscode-languageserver-protocol/lib/protocol.selectionRange.d.ts
5
+
6
+ # rubocop:disable Layout/EmptyLinesAroundClassBody
7
+ # rubocop:disable Lint/UselessAssignment
8
+ # rubocop:disable Naming/MethodName
9
+
10
+ module LSP
11
+ # export interface SelectionRangeClientCapabilities {
12
+ # /**
13
+ # * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
14
+ # * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
15
+ # * capability as well.
16
+ # */
17
+ # dynamicRegistration?: boolean;
18
+ # }
19
+ class SelectionRangeClientCapabilities < LSPBase
20
+ attr_accessor :dynamicRegistration # type: boolean
21
+
22
+ def initialize(initial_hash = nil)
23
+ super
24
+ @optional_method_names = %i[dynamicRegistration]
25
+ end
26
+
27
+ def from_h!(value)
28
+ value = {} if value.nil?
29
+ self.dynamicRegistration = value['dynamicRegistration'] # Unknown type
30
+ self
31
+ end
32
+ end
33
+
34
+ # export interface SelectionRangeOptions extends WorkDoneProgressOptions {
35
+ # }
36
+ class SelectionRangeOptions < LSPBase
37
+
38
+ def from_h!(value)
39
+ value = {} if value.nil?
40
+ self
41
+ end
42
+ end
43
+
44
+ # export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
45
+ # }
46
+ class SelectionRangeRegistrationOptions < LSPBase
47
+
48
+ def from_h!(value)
49
+ value = {} if value.nil?
50
+ self
51
+ end
52
+ end
53
+
54
+ # export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams {
55
+ # /**
56
+ # * The text document.
57
+ # */
58
+ # textDocument: TextDocumentIdentifier;
59
+ # /**
60
+ # * The positions inside the text document.
61
+ # */
62
+ # positions: Position[];
63
+ # }
64
+ class SelectionRangeParams < LSPBase
65
+ attr_accessor :textDocument, :positions # type: TextDocumentIdentifier # type: Position[]
66
+
67
+ def from_h!(value)
68
+ value = {} if value.nil?
69
+ self.textDocument = value['textDocument'] # Unknown type
70
+ self.positions = value['positions'].map { |val| val } unless value['positions'].nil? # Unknown array type
71
+ self
72
+ end
73
+ end
74
+ end
75
+
76
+ # rubocop:enable Layout/EmptyLinesAroundClassBody
77
+ # rubocop:enable Lint/UselessAssignment
78
+ # rubocop:enable Style/AsciiComments
79
+ # rubocop:enable Naming/MethodName
@@ -0,0 +1,340 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DO NOT MODIFY. This file is built automatically
4
+ # LSP Protocol: vscode-languageserver-protocol/lib/protocol.sematicTokens.proposed.d.ts
5
+
6
+ # rubocop:disable Naming/MethodName
7
+
8
+ module LSP
9
+ # export interface SemanticTokensLegend {
10
+ # /**
11
+ # * The token types a server uses.
12
+ # */
13
+ # tokenTypes: string[];
14
+ # /**
15
+ # * The token modifiers a server uses.
16
+ # */
17
+ # tokenModifiers: string[];
18
+ # }
19
+ class SemanticTokensLegend < LSPBase
20
+ attr_accessor :tokenTypes, :tokenModifiers # type: string[] # type: string[]
21
+
22
+ def from_h!(value)
23
+ value = {} if value.nil?
24
+ self.tokenTypes = value['tokenTypes'].map { |val| val } unless value['tokenTypes'].nil?
25
+ self.tokenModifiers = value['tokenModifiers'].map { |val| val } unless value['tokenModifiers'].nil?
26
+ self
27
+ end
28
+ end
29
+
30
+ # export interface SemanticTokens {
31
+ # /**
32
+ # * An optional result id. If provided and clients support delta updating
33
+ # * the client will include the result id in the next semantic token request.
34
+ # * A server can then instead of computing all sematic tokens again simply
35
+ # * send a delta.
36
+ # */
37
+ # resultId?: string;
38
+ # /**
39
+ # * The actual tokens. For a detailed description about how the data is
40
+ # * structured pls see
41
+ # * https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L71
42
+ # */
43
+ # data: number[];
44
+ # }
45
+ class SemanticTokens < LSPBase
46
+ attr_accessor :resultId, :data # type: string # type: number[]
47
+
48
+ def initialize(initial_hash = nil)
49
+ super
50
+ @optional_method_names = %i[resultId]
51
+ end
52
+
53
+ def from_h!(value)
54
+ value = {} if value.nil?
55
+ self.resultId = value['resultId']
56
+ self.data = value['data'].map { |val| val } unless value['data'].nil?
57
+ self
58
+ end
59
+ end
60
+
61
+ # export interface SemanticTokensPartialResult {
62
+ # data: number[];
63
+ # }
64
+ class SemanticTokensPartialResult < LSPBase
65
+ attr_accessor :data # type: number[]
66
+
67
+ def from_h!(value)
68
+ value = {} if value.nil?
69
+ self.data = value['data'].map { |val| val } unless value['data'].nil?
70
+ self
71
+ end
72
+ end
73
+
74
+ # export interface SemanticTokensEdit {
75
+ # start: number;
76
+ # deleteCount: number;
77
+ # data?: number[];
78
+ # }
79
+ class SemanticTokensEdit < LSPBase
80
+ attr_accessor :start, :deleteCount, :data # type: number # type: number # type: number[]
81
+
82
+ def initialize(initial_hash = nil)
83
+ super
84
+ @optional_method_names = %i[data]
85
+ end
86
+
87
+ def from_h!(value)
88
+ value = {} if value.nil?
89
+ self.start = value['start']
90
+ self.deleteCount = value['deleteCount']
91
+ self.data = value['data'].map { |val| val } unless value['data'].nil?
92
+ self
93
+ end
94
+ end
95
+
96
+ # export interface SemanticTokensEdits {
97
+ # readonly resultId?: string;
98
+ # /**
99
+ # * For a detailed description how these edits are structured pls see
100
+ # * https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L131
101
+ # */
102
+ # edits: SemanticTokensEdit[];
103
+ # }
104
+ class SemanticTokensEdits < LSPBase
105
+ attr_accessor :resultId, :edits # type: string # type: SemanticTokensEdit[]
106
+
107
+ def initialize(initial_hash = nil)
108
+ super
109
+ @optional_method_names = %i[resultId]
110
+ end
111
+
112
+ def from_h!(value)
113
+ value = {} if value.nil?
114
+ self.resultId = value['resultId']
115
+ self.edits = to_typed_aray(value['edits'], SemanticTokensEdit)
116
+ self
117
+ end
118
+ end
119
+
120
+ # export interface SemanticTokensEditsPartialResult {
121
+ # edits: SemanticTokensEdit[];
122
+ # }
123
+ class SemanticTokensEditsPartialResult < LSPBase
124
+ attr_accessor :edits # type: SemanticTokensEdit[]
125
+
126
+ def from_h!(value)
127
+ value = {} if value.nil?
128
+ self.edits = to_typed_aray(value['edits'], SemanticTokensEdit)
129
+ self
130
+ end
131
+ end
132
+
133
+ # export interface SemanticTokensClientCapabilities {
134
+ # /**
135
+ # * The text document client capabilities
136
+ # */
137
+ # textDocument?: {
138
+ # /**
139
+ # * Capabilities specific to the `textDocument/semanticTokens`
140
+ # *
141
+ # * @since 3.16.0 - Proposed state
142
+ # */
143
+ # semanticTokens?: {
144
+ # /**
145
+ # * Whether implementation supports dynamic registration. If this is set to `true`
146
+ # * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
147
+ # * return value for the corresponding server capability as well.
148
+ # */
149
+ # dynamicRegistration?: boolean;
150
+ # /**
151
+ # * The token types know by the client.
152
+ # */
153
+ # tokenTypes: string[];
154
+ # /**
155
+ # * The token modifiers know by the client.
156
+ # */
157
+ # tokenModifiers: string[];
158
+ # };
159
+ # };
160
+ # }
161
+ class SemanticTokensClientCapabilities < LSPBase
162
+ attr_accessor :textDocument # type: {
163
+
164
+ # /**
165
+ # * Capabilities specific to the `textDocument/semanticTokens`
166
+ # *
167
+ # * @since 3.16.0 - Proposed state
168
+ # */
169
+ # semanticTokens?: {
170
+ # /**
171
+ # * Whether implementation supports dynamic registration. If this is set to `true`
172
+ # * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
173
+ # * return value for the corresponding server capability as well.
174
+ # */
175
+ # dynamicRegistration?: boolean;
176
+ # /**
177
+ # * The token types know by the client.
178
+ # */
179
+ # tokenTypes: string[];
180
+ # /**
181
+ # * The token modifiers know by the client.
182
+ # */
183
+ # tokenModifiers: string[];
184
+ # };
185
+ # }
186
+
187
+ def initialize(initial_hash = nil)
188
+ super
189
+ @optional_method_names = %i[textDocument]
190
+ end
191
+
192
+ def from_h!(value)
193
+ value = {} if value.nil?
194
+ self.textDocument = value['textDocument'] # Unknown type
195
+ self
196
+ end
197
+ end
198
+
199
+ # export interface SemanticTokensOptions extends WorkDoneProgressOptions {
200
+ # /**
201
+ # * The legend used by the server
202
+ # */
203
+ # legend: SemanticTokensLegend;
204
+ # /**
205
+ # * Server supports providing semantic tokens for a sepcific range
206
+ # * of a document.
207
+ # */
208
+ # rangeProvider?: boolean;
209
+ # /**
210
+ # * Server supports providing semantic tokens for a full document.
211
+ # */
212
+ # documentProvider?: boolean | {
213
+ # /**
214
+ # * The server supports deltas for full documents.
215
+ # */
216
+ # edits?: boolean;
217
+ # };
218
+ # }
219
+ class SemanticTokensOptions < LSPBase
220
+ attr_accessor :legend, :rangeProvider, :documentProvider # type: SemanticTokensLegend # type: boolean # type: boolean | {
221
+
222
+ # /**
223
+ # * The server supports deltas for full documents.
224
+ # */
225
+ # edits?: boolean;
226
+ # }
227
+
228
+ def initialize(initial_hash = nil)
229
+ super
230
+ @optional_method_names = %i[rangeProvider documentProvider]
231
+ end
232
+
233
+ def from_h!(value)
234
+ value = {} if value.nil?
235
+ self.legend = SemanticTokensLegend.new(value['legend']) unless value['legend'].nil?
236
+ self.rangeProvider = value['rangeProvider'] # Unknown type
237
+ self.documentProvider = value['documentProvider'] # Unknown type
238
+ self
239
+ end
240
+ end
241
+
242
+ # export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
243
+ # }
244
+ class SemanticTokensRegistrationOptions < LSPBase
245
+ attr_accessor :legend, :rangeProvider, :documentProvider # type: SemanticTokensLegend # type: boolean # type: boolean | {
246
+
247
+ # /**
248
+ # * The server supports deltas for full documents.
249
+ # */
250
+ # edits?: boolean;
251
+ # }
252
+
253
+ def initialize(initial_hash = nil)
254
+ super
255
+ @optional_method_names = %i[rangeProvider documentProvider]
256
+ end
257
+
258
+ def from_h!(value)
259
+ value = {} if value.nil?
260
+ self.legend = SemanticTokensLegend.new(value['legend']) unless value['legend'].nil?
261
+ self.rangeProvider = value['rangeProvider'] # Unknown type
262
+ self.documentProvider = value['documentProvider'] # Unknown type
263
+ self
264
+ end
265
+ end
266
+
267
+ # export interface SemanticTokensServerCapabilities {
268
+ # semanticTokensProvider: SemanticTokensOptions | SemanticTokensRegistrationOptions;
269
+ # }
270
+ class SemanticTokensServerCapabilities < LSPBase
271
+ attr_accessor :semanticTokensProvider # type: SemanticTokensOptions | SemanticTokensRegistrationOptions
272
+
273
+ def from_h!(value)
274
+ value = {} if value.nil?
275
+ self.semanticTokensProvider = value['semanticTokensProvider'] # Unknown type
276
+ self
277
+ end
278
+ end
279
+
280
+ # export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
281
+ # /**
282
+ # * The text document.
283
+ # */
284
+ # textDocument: TextDocumentIdentifier;
285
+ # }
286
+ class SemanticTokensParams < LSPBase
287
+ attr_accessor :textDocument # type: TextDocumentIdentifier
288
+
289
+ def from_h!(value)
290
+ value = {} if value.nil?
291
+ self.textDocument = value['textDocument'] # Unknown type
292
+ self
293
+ end
294
+ end
295
+
296
+ # export interface SemanticTokensEditsParams extends WorkDoneProgressParams, PartialResultParams {
297
+ # /**
298
+ # * The text document.
299
+ # */
300
+ # textDocument: TextDocumentIdentifier;
301
+ # /**
302
+ # * The previous result id.
303
+ # */
304
+ # previousResultId: string;
305
+ # }
306
+ class SemanticTokensEditsParams < LSPBase
307
+ attr_accessor :textDocument, :previousResultId # type: TextDocumentIdentifier # type: string
308
+
309
+ def from_h!(value)
310
+ value = {} if value.nil?
311
+ self.textDocument = value['textDocument'] # Unknown type
312
+ self.previousResultId = value['previousResultId']
313
+ self
314
+ end
315
+ end
316
+
317
+ # export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
318
+ # /**
319
+ # * The text document.
320
+ # */
321
+ # textDocument: TextDocumentIdentifier;
322
+ # /**
323
+ # * The range the semantic tokens are requested for.
324
+ # */
325
+ # range: Range;
326
+ # }
327
+ class SemanticTokensRangeParams < LSPBase
328
+ attr_accessor :textDocument, :range # type: TextDocumentIdentifier # type: Range
329
+
330
+ def from_h!(value)
331
+ value = {} if value.nil?
332
+ self.textDocument = value['textDocument'] # Unknown type
333
+ self.range = value['range'] # Unknown type
334
+ self
335
+ end
336
+ end
337
+ end
338
+
339
+ # rubocop:enable Style/AsciiComments
340
+ # rubocop:enable Naming/MethodName
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DO NOT MODIFY. This file is built automatically
4
+ # LSP Protocol: vscode-languageserver-protocol/lib/protocol.typeDefinition.d.ts
5
+
6
+ # rubocop:disable Layout/EmptyLinesAroundClassBody
7
+ # rubocop:disable Lint/UselessAssignment
8
+ # rubocop:disable Naming/MethodName
9
+
10
+ module LSP
11
+ # export interface TypeDefinitionClientCapabilities {
12
+ # /**
13
+ # * Whether implementation supports dynamic registration. If this is set to `true`
14
+ # * the client supports the new `TypeDefinitionRegistrationOptions` return value
15
+ # * for the corresponding server capability as well.
16
+ # */
17
+ # dynamicRegistration?: boolean;
18
+ # /**
19
+ # * The client supports additional metadata in the form of definition links.
20
+ # *
21
+ # * Since 3.14.0
22
+ # */
23
+ # linkSupport?: boolean;
24
+ # }
25
+ class TypeDefinitionClientCapabilities < LSPBase
26
+ attr_accessor :dynamicRegistration, :linkSupport # type: boolean # type: boolean
27
+
28
+ def initialize(initial_hash = nil)
29
+ super
30
+ @optional_method_names = %i[dynamicRegistration linkSupport]
31
+ end
32
+
33
+ def from_h!(value)
34
+ value = {} if value.nil?
35
+ self.dynamicRegistration = value['dynamicRegistration'] # Unknown type
36
+ self.linkSupport = value['linkSupport'] # Unknown type
37
+ self
38
+ end
39
+ end
40
+
41
+ # export interface TypeDefinitionOptions extends WorkDoneProgressOptions {
42
+ # }
43
+ class TypeDefinitionOptions < LSPBase
44
+
45
+ def from_h!(value)
46
+ value = {} if value.nil?
47
+ self
48
+ end
49
+ end
50
+
51
+ # export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
52
+ # }
53
+ class TypeDefinitionRegistrationOptions < LSPBase
54
+
55
+ def from_h!(value)
56
+ value = {} if value.nil?
57
+ self
58
+ end
59
+ end
60
+
61
+ # export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
62
+ # }
63
+ class TypeDefinitionParams < LSPBase
64
+
65
+ def from_h!(value)
66
+ value = {} if value.nil?
67
+ self
68
+ end
69
+ end
70
+ end
71
+
72
+ # rubocop:enable Layout/EmptyLinesAroundClassBody
73
+ # rubocop:enable Lint/UselessAssignment
74
+ # rubocop:enable Style/AsciiComments
75
+ # rubocop:enable Naming/MethodName