Class: LanguageServer::Protocol::Interface::ServerCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::ServerCapabilities
- Defined in:
- lib/language_server/protocol/interface/server_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#call_hierarchy_provider ⇒ boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions
The server provides call hierarchy support.
-
#code_action_provider ⇒ boolean | CodeActionOptions
The server provides code actions.
-
#code_lens_provider ⇒ CodeLensOptions
The server provides code lens.
-
#color_provider ⇒ boolean | DocumentColorOptions | DocumentColorRegistrationOptions
The server provides color provider support.
-
#completion_provider ⇒ CompletionOptions
The server provides completion support.
-
#declaration_provider ⇒ boolean | DeclarationOptions | DeclarationRegistrationOptions
The server provides go to declaration support.
-
#definition_provider ⇒ boolean | DefinitionOptions
The server provides goto definition support.
-
#diagnostic_provider ⇒ DiagnosticOptions | DiagnosticRegistrationOptions
The server has support for pull model diagnostics.
-
#document_formatting_provider ⇒ boolean | DocumentFormattingOptions
The server provides document formatting.
-
#document_highlight_provider ⇒ boolean | DocumentHighlightOptions
The server provides document highlight support.
-
#document_link_provider ⇒ DocumentLinkOptions
The server provides document link support.
-
#document_on_type_formatting_provider ⇒ DocumentOnTypeFormattingOptions
The server provides document formatting on typing.
-
#document_range_formatting_provider ⇒ boolean | DocumentRangeFormattingOptions
The server provides document range formatting.
-
#document_symbol_provider ⇒ boolean | DocumentSymbolOptions
The server provides document symbol support.
-
#execute_command_provider ⇒ ExecuteCommandOptions
The server provides execute command support.
-
#experimental ⇒ LSPAny
Experimental server capabilities.
-
#folding_range_provider ⇒ boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions
The server provides folding provider support.
-
#hover_provider ⇒ boolean | HoverOptions
The server provides hover support.
-
#implementation_provider ⇒ boolean | ImplementationOptions | ImplementationRegistrationOptions
The server provides goto implementation support.
-
#initialize(position_encoding: nil, text_document_sync: nil, notebook_document_sync: nil, completion_provider: nil, hover_provider: nil, signature_help_provider: nil, declaration_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_link_provider: nil, color_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, folding_range_provider: nil, execute_command_provider: nil, selection_range_provider: nil, linked_editing_range_provider: nil, call_hierarchy_provider: nil, semantic_tokens_provider: nil, moniker_provider: nil, type_hierarchy_provider: nil, inline_value_provider: nil, inlay_hint_provider: nil, diagnostic_provider: nil, workspace_symbol_provider: nil, workspace: nil, experimental: nil) ⇒ ServerCapabilities
constructor
A new instance of ServerCapabilities.
-
#inlay_hint_provider ⇒ boolean | InlayHintOptions | InlayHintRegistrationOptions
The server provides inlay hints.
-
#inline_value_provider ⇒ boolean | InlineValueOptions | InlineValueRegistrationOptions
The server provides inline values.
-
#linked_editing_range_provider ⇒ boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions
The server provides linked editing range support.
-
#moniker_provider ⇒ boolean | MonikerOptions | MonikerRegistrationOptions
Whether server provides moniker support.
-
#notebook_document_sync ⇒ NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions
Defines how notebook documents are synced.
-
#position_encoding ⇒ string
The position encoding the server picked from the encodings offered by the client via the client capability ‘general.positionEncodings`.
-
#references_provider ⇒ boolean | ReferenceOptions
The server provides find references support.
-
#rename_provider ⇒ boolean | RenameOptions
The server provides rename support.
-
#selection_range_provider ⇒ boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions
The server provides selection range support.
-
#semantic_tokens_provider ⇒ SemanticTokensOptions | SemanticTokensRegistrationOptions
The server provides semantic tokens support.
-
#signature_help_provider ⇒ SignatureHelpOptions
The server provides signature help support.
-
#text_document_sync ⇒ TextDocumentSyncOptions | TextDocumentSyncKind
Defines how text documents are synced.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#type_definition_provider ⇒ boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions
The server provides goto type definition support.
-
#type_hierarchy_provider ⇒ boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions
The server provides type hierarchy support.
-
#workspace ⇒ { workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }
Workspace specific server capabilities.
-
#workspace_symbol_provider ⇒ boolean | WorkspaceSymbolOptions
The server provides workspace symbol support.
Constructor Details
#initialize(position_encoding: nil, text_document_sync: nil, notebook_document_sync: nil, completion_provider: nil, hover_provider: nil, signature_help_provider: nil, declaration_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_link_provider: nil, color_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, folding_range_provider: nil, execute_command_provider: nil, selection_range_provider: nil, linked_editing_range_provider: nil, call_hierarchy_provider: nil, semantic_tokens_provider: nil, moniker_provider: nil, type_hierarchy_provider: nil, inline_value_provider: nil, inlay_hint_provider: nil, diagnostic_provider: nil, workspace_symbol_provider: nil, workspace: nil, experimental: nil) ⇒ ServerCapabilities
Returns a new instance of ServerCapabilities.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 5 def initialize(position_encoding: nil, text_document_sync: nil, notebook_document_sync: nil, completion_provider: nil, hover_provider: nil, signature_help_provider: nil, declaration_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_link_provider: nil, color_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, folding_range_provider: nil, execute_command_provider: nil, selection_range_provider: nil, linked_editing_range_provider: nil, call_hierarchy_provider: nil, semantic_tokens_provider: nil, moniker_provider: nil, type_hierarchy_provider: nil, inline_value_provider: nil, inlay_hint_provider: nil, diagnostic_provider: nil, workspace_symbol_provider: nil, workspace: nil, experimental: nil) @attributes = {} @attributes[:positionEncoding] = position_encoding if position_encoding @attributes[:textDocumentSync] = text_document_sync if text_document_sync @attributes[:notebookDocumentSync] = notebook_document_sync if notebook_document_sync @attributes[:completionProvider] = completion_provider if completion_provider @attributes[:hoverProvider] = hover_provider if hover_provider @attributes[:signatureHelpProvider] = signature_help_provider if signature_help_provider @attributes[:declarationProvider] = declaration_provider if declaration_provider @attributes[:definitionProvider] = definition_provider if definition_provider @attributes[:typeDefinitionProvider] = type_definition_provider if type_definition_provider @attributes[:implementationProvider] = implementation_provider if implementation_provider @attributes[:referencesProvider] = references_provider if references_provider @attributes[:documentHighlightProvider] = document_highlight_provider if document_highlight_provider @attributes[:documentSymbolProvider] = document_symbol_provider if document_symbol_provider @attributes[:codeActionProvider] = code_action_provider if code_action_provider @attributes[:codeLensProvider] = code_lens_provider if code_lens_provider @attributes[:documentLinkProvider] = document_link_provider if document_link_provider @attributes[:colorProvider] = color_provider if color_provider @attributes[:documentFormattingProvider] = document_formatting_provider if document_formatting_provider @attributes[:documentRangeFormattingProvider] = document_range_formatting_provider if document_range_formatting_provider @attributes[:documentOnTypeFormattingProvider] = document_on_type_formatting_provider if document_on_type_formatting_provider @attributes[:renameProvider] = rename_provider if rename_provider @attributes[:foldingRangeProvider] = folding_range_provider if folding_range_provider @attributes[:executeCommandProvider] = execute_command_provider if execute_command_provider @attributes[:selectionRangeProvider] = selection_range_provider if selection_range_provider @attributes[:linkedEditingRangeProvider] = linked_editing_range_provider if linked_editing_range_provider @attributes[:callHierarchyProvider] = call_hierarchy_provider if call_hierarchy_provider @attributes[:semanticTokensProvider] = semantic_tokens_provider if semantic_tokens_provider @attributes[:monikerProvider] = moniker_provider if moniker_provider @attributes[:typeHierarchyProvider] = type_hierarchy_provider if type_hierarchy_provider @attributes[:inlineValueProvider] = inline_value_provider if inline_value_provider @attributes[:inlayHintProvider] = inlay_hint_provider if inlay_hint_provider @attributes[:diagnosticProvider] = diagnostic_provider if diagnostic_provider @attributes[:workspaceSymbolProvider] = workspace_symbol_provider if workspace_symbol_provider @attributes[:workspace] = workspace if workspace @attributes[:experimental] = experimental if experimental @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
340 341 342 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 340 def attributes @attributes end |
Instance Method Details
#call_hierarchy_provider ⇒ boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions
The server provides call hierarchy support.
264 265 266 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 264 def call_hierarchy_provider attributes.fetch(:callHierarchyProvider) end |
#code_action_provider ⇒ boolean | CodeActionOptions
The server provides code actions. The ‘CodeActionOptions` return type is only valid if the client signals code action literal support via the property `textDocument.codeAction.codeActionLiteralSupport`.
166 167 168 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 166 def code_action_provider attributes.fetch(:codeActionProvider) end |
#code_lens_provider ⇒ CodeLensOptions
The server provides code lens.
174 175 176 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 174 def code_lens_provider attributes.fetch(:codeLensProvider) end |
#color_provider ⇒ boolean | DocumentColorOptions | DocumentColorRegistrationOptions
The server provides color provider support.
190 191 192 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 190 def color_provider attributes.fetch(:colorProvider) end |
#completion_provider ⇒ CompletionOptions
The server provides completion support.
84 85 86 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 84 def completion_provider attributes.fetch(:completionProvider) end |
#declaration_provider ⇒ boolean | DeclarationOptions | DeclarationRegistrationOptions
The server provides go to declaration support.
108 109 110 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 108 def declaration_provider attributes.fetch(:declarationProvider) end |
#definition_provider ⇒ boolean | DefinitionOptions
The server provides goto definition support.
116 117 118 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 116 def definition_provider attributes.fetch(:definitionProvider) end |
#diagnostic_provider ⇒ DiagnosticOptions | DiagnosticRegistrationOptions
The server has support for pull model diagnostics.
312 313 314 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 312 def diagnostic_provider attributes.fetch(:diagnosticProvider) end |
#document_formatting_provider ⇒ boolean | DocumentFormattingOptions
The server provides document formatting.
198 199 200 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 198 def document_formatting_provider attributes.fetch(:documentFormattingProvider) end |
#document_highlight_provider ⇒ boolean | DocumentHighlightOptions
The server provides document highlight support.
148 149 150 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 148 def document_highlight_provider attributes.fetch(:documentHighlightProvider) end |
#document_link_provider ⇒ DocumentLinkOptions
The server provides document link support.
182 183 184 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 182 def document_link_provider attributes.fetch(:documentLinkProvider) end |
#document_on_type_formatting_provider ⇒ DocumentOnTypeFormattingOptions
The server provides document formatting on typing.
214 215 216 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 214 def document_on_type_formatting_provider attributes.fetch(:documentOnTypeFormattingProvider) end |
#document_range_formatting_provider ⇒ boolean | DocumentRangeFormattingOptions
The server provides document range formatting.
206 207 208 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 206 def document_range_formatting_provider attributes.fetch(:documentRangeFormattingProvider) end |
#document_symbol_provider ⇒ boolean | DocumentSymbolOptions
The server provides document symbol support.
156 157 158 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 156 def document_symbol_provider attributes.fetch(:documentSymbolProvider) end |
#execute_command_provider ⇒ ExecuteCommandOptions
The server provides execute command support.
240 241 242 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 240 def execute_command_provider attributes.fetch(:executeCommandProvider) end |
#experimental ⇒ LSPAny
Experimental server capabilities.
336 337 338 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 336 def experimental attributes.fetch(:experimental) end |
#folding_range_provider ⇒ boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions
The server provides folding provider support.
232 233 234 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 232 def folding_range_provider attributes.fetch(:foldingRangeProvider) end |
#hover_provider ⇒ boolean | HoverOptions
The server provides hover support.
92 93 94 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 92 def hover_provider attributes.fetch(:hoverProvider) end |
#implementation_provider ⇒ boolean | ImplementationOptions | ImplementationRegistrationOptions
The server provides goto implementation support.
132 133 134 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 132 def implementation_provider attributes.fetch(:implementationProvider) end |
#inlay_hint_provider ⇒ boolean | InlayHintOptions | InlayHintRegistrationOptions
The server provides inlay hints.
304 305 306 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 304 def inlay_hint_provider attributes.fetch(:inlayHintProvider) end |
#inline_value_provider ⇒ boolean | InlineValueOptions | InlineValueRegistrationOptions
The server provides inline values.
296 297 298 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 296 def inline_value_provider attributes.fetch(:inlineValueProvider) end |
#linked_editing_range_provider ⇒ boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions
The server provides linked editing range support.
256 257 258 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 256 def linked_editing_range_provider attributes.fetch(:linkedEditingRangeProvider) end |
#moniker_provider ⇒ boolean | MonikerOptions | MonikerRegistrationOptions
Whether server provides moniker support.
280 281 282 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 280 def moniker_provider attributes.fetch(:monikerProvider) end |
#notebook_document_sync ⇒ NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions
Defines how notebook documents are synced.
76 77 78 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 76 def notebook_document_sync attributes.fetch(:notebookDocumentSync) end |
#position_encoding ⇒ string
The position encoding the server picked from the encodings offered by the client via the client capability ‘general.positionEncodings`.
If the client didn’t provide any position encodings the only valid value that a server can return is ‘utf-16’.
If omitted it defaults to ‘utf-16’.
57 58 59 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 57 def position_encoding attributes.fetch(:positionEncoding) end |
#references_provider ⇒ boolean | ReferenceOptions
The server provides find references support.
140 141 142 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 140 def references_provider attributes.fetch(:referencesProvider) end |
#rename_provider ⇒ boolean | RenameOptions
The server provides rename support. RenameOptions may only be specified if the client states that it supports ‘prepareSupport` in its initial `initialize` request.
224 225 226 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 224 def rename_provider attributes.fetch(:renameProvider) end |
#selection_range_provider ⇒ boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions
The server provides selection range support.
248 249 250 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 248 def selection_range_provider attributes.fetch(:selectionRangeProvider) end |
#semantic_tokens_provider ⇒ SemanticTokensOptions | SemanticTokensRegistrationOptions
The server provides semantic tokens support.
272 273 274 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 272 def semantic_tokens_provider attributes.fetch(:semanticTokensProvider) end |
#signature_help_provider ⇒ SignatureHelpOptions
The server provides signature help support.
100 101 102 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 100 def signature_help_provider attributes.fetch(:signatureHelpProvider) end |
#text_document_sync ⇒ TextDocumentSyncOptions | TextDocumentSyncKind
Defines how text documents are synced. Is either a detailed structure defining each notification or for backwards compatibility the TextDocumentSyncKind number. If omitted it defaults to ‘TextDocumentSyncKind.None`.
68 69 70 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 68 def text_document_sync attributes.fetch(:textDocumentSync) end |
#to_hash ⇒ Object
342 343 344 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 342 def to_hash attributes end |
#to_json(*args) ⇒ Object
346 347 348 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 346 def to_json(*args) to_hash.to_json(*args) end |
#type_definition_provider ⇒ boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions
The server provides goto type definition support.
124 125 126 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 124 def type_definition_provider attributes.fetch(:typeDefinitionProvider) end |
#type_hierarchy_provider ⇒ boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions
The server provides type hierarchy support.
288 289 290 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 288 def type_hierarchy_provider attributes.fetch(:typeHierarchyProvider) end |
#workspace ⇒ { workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }
Workspace specific server capabilities
328 329 330 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 328 def workspace attributes.fetch(:workspace) end |
#workspace_symbol_provider ⇒ boolean | WorkspaceSymbolOptions
The server provides workspace symbol support.
320 321 322 |
# File 'lib/language_server/protocol/interface/server_capabilities.rb', line 320 def workspace_symbol_provider attributes.fetch(:workspaceSymbolProvider) end |