Class: LanguageServer::Protocol::Interface::TextDocumentClientCapabilities

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/text_document_client_capabilities.rb

Overview

Text document specific client capabilities.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, publish_diagnostics: nil, folding_range: nil, selection_range: nil, linked_editing_range: nil, call_hierarchy: nil, semantic_tokens: nil, moniker: nil, type_hierarchy: nil, inline_value: nil, inlay_hint: nil, diagnostic: nil) ⇒ TextDocumentClientCapabilities

Returns a new instance of TextDocumentClientCapabilities.



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
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 8

def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, publish_diagnostics: nil, folding_range: nil, selection_range: nil, linked_editing_range: nil, call_hierarchy: nil, semantic_tokens: nil, moniker: nil, type_hierarchy: nil, inline_value: nil, inlay_hint: nil, diagnostic: nil)
  @attributes = {}

  @attributes[:synchronization] = synchronization if synchronization
  @attributes[:completion] = completion if completion
  @attributes[:hover] = hover if hover
  @attributes[:signatureHelp] = signature_help if signature_help
  @attributes[:declaration] = declaration if declaration
  @attributes[:definition] = definition if definition
  @attributes[:typeDefinition] = type_definition if type_definition
  @attributes[:implementation] = implementation if implementation
  @attributes[:references] = references if references
  @attributes[:documentHighlight] = document_highlight if document_highlight
  @attributes[:documentSymbol] = document_symbol if document_symbol
  @attributes[:codeAction] = code_action if code_action
  @attributes[:codeLens] = code_lens if code_lens
  @attributes[:documentLink] = document_link if document_link
  @attributes[:colorProvider] = color_provider if color_provider
  @attributes[:formatting] = formatting if formatting
  @attributes[:rangeFormatting] = range_formatting if range_formatting
  @attributes[:onTypeFormatting] = on_type_formatting if on_type_formatting
  @attributes[:rename] = rename if rename
  @attributes[:publishDiagnostics] = publish_diagnostics if publish_diagnostics
  @attributes[:foldingRange] = folding_range if folding_range
  @attributes[:selectionRange] = selection_range if selection_range
  @attributes[:linkedEditingRange] = linked_editing_range if linked_editing_range
  @attributes[:callHierarchy] = call_hierarchy if call_hierarchy
  @attributes[:semanticTokens] = semantic_tokens if semantic_tokens
  @attributes[:moniker] = moniker if moniker
  @attributes[:typeHierarchy] = type_hierarchy if type_hierarchy
  @attributes[:inlineValue] = inline_value if inline_value
  @attributes[:inlayHint] = inlay_hint if inlay_hint
  @attributes[:diagnostic] = diagnostic if diagnostic

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



285
286
287
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 285

def attributes
  @attributes
end

Instance Method Details

#call_hierarchyCallHierarchyClientCapabilities

Capabilities specific to the various call hierarchy requests.



233
234
235
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 233

def call_hierarchy
  attributes.fetch(:callHierarchy)
end

#code_actionCodeActionClientCapabilities

Capabilities specific to the ‘textDocument/codeAction` request.



134
135
136
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 134

def code_action
  attributes.fetch(:codeAction)
end

#code_lensCodeLensClientCapabilities

Capabilities specific to the ‘textDocument/codeLens` request.



142
143
144
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 142

def code_lens
  attributes.fetch(:codeLens)
end

#color_providerDocumentColorClientCapabilities

Capabilities specific to the ‘textDocument/documentColor` and the `textDocument/colorPresentation` request.



159
160
161
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 159

def color_provider
  attributes.fetch(:colorProvider)
end

#completionCompletionClientCapabilities

Capabilities specific to the ‘textDocument/completion` request.



54
55
56
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 54

def completion
  attributes.fetch(:completion)
end

#declarationDeclarationClientCapabilities

Capabilities specific to the ‘textDocument/declaration` request.



78
79
80
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 78

def declaration
  attributes.fetch(:declaration)
end

#definitionDefinitionClientCapabilities

Capabilities specific to the ‘textDocument/definition` request.



86
87
88
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 86

def definition
  attributes.fetch(:definition)
end

#diagnosticDiagnosticClientCapabilities

Capabilities specific to the diagnostic pull model.



281
282
283
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 281

def diagnostic
  attributes.fetch(:diagnostic)
end

#document_highlightDocumentHighlightClientCapabilities

Capabilities specific to the ‘textDocument/documentHighlight` request.



118
119
120
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 118

def document_highlight
  attributes.fetch(:documentHighlight)
end

Capabilities specific to the ‘textDocument/documentLink` request.



150
151
152
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 150

def document_link
  attributes.fetch(:documentLink)
end

#document_symbolDocumentSymbolClientCapabilities

Capabilities specific to the ‘textDocument/documentSymbol` request.



126
127
128
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 126

def document_symbol
  attributes.fetch(:documentSymbol)
end

#folding_rangeFoldingRangeClientCapabilities

Capabilities specific to the ‘textDocument/foldingRange` request.



209
210
211
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 209

def folding_range
  attributes.fetch(:foldingRange)
end

#formattingDocumentFormattingClientCapabilities

Capabilities specific to the ‘textDocument/formatting` request.



167
168
169
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 167

def formatting
  attributes.fetch(:formatting)
end

#hoverHoverClientCapabilities

Capabilities specific to the ‘textDocument/hover` request.



62
63
64
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 62

def hover
  attributes.fetch(:hover)
end

#implementationImplementationClientCapabilities

Capabilities specific to the ‘textDocument/implementation` request.



102
103
104
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 102

def implementation
  attributes.fetch(:implementation)
end

#inlay_hintInlayHintClientCapabilities

Capabilities specific to the ‘textDocument/inlayHint` request.



273
274
275
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 273

def inlay_hint
  attributes.fetch(:inlayHint)
end

#inline_valueInlineValueClientCapabilities

Capabilities specific to the ‘textDocument/inlineValue` request.



265
266
267
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 265

def inline_value
  attributes.fetch(:inlineValue)
end

#linked_editing_rangeLinkedEditingRangeClientCapabilities

Capabilities specific to the ‘textDocument/linkedEditingRange` request.



225
226
227
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 225

def linked_editing_range
  attributes.fetch(:linkedEditingRange)
end

#monikerMonikerClientCapabilities

Capabilities specific to the ‘textDocument/moniker` request.



249
250
251
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 249

def moniker
  attributes.fetch(:moniker)
end

#on_type_formattingDocumentOnTypeFormattingClientCapabilities

request. Capabilities specific to the ‘textDocument/onTypeFormatting` request.



184
185
186
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 184

def on_type_formatting
  attributes.fetch(:onTypeFormatting)
end

#publish_diagnosticsPublishDiagnosticsClientCapabilities

Capabilities specific to the ‘textDocument/publishDiagnostics` notification.



201
202
203
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 201

def publish_diagnostics
  attributes.fetch(:publishDiagnostics)
end

#range_formattingDocumentRangeFormattingClientCapabilities

Capabilities specific to the ‘textDocument/rangeFormatting` request.



175
176
177
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 175

def range_formatting
  attributes.fetch(:rangeFormatting)
end

#referencesReferenceClientCapabilities

Capabilities specific to the ‘textDocument/references` request.



110
111
112
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 110

def references
  attributes.fetch(:references)
end

#renameRenameClientCapabilities

Capabilities specific to the ‘textDocument/rename` request.



192
193
194
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 192

def rename
  attributes.fetch(:rename)
end

#selection_rangeSelectionRangeClientCapabilities

Capabilities specific to the ‘textDocument/selectionRange` request.



217
218
219
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 217

def selection_range
  attributes.fetch(:selectionRange)
end

#semantic_tokensSemanticTokensClientCapabilities

Capabilities specific to the various semantic token requests.



241
242
243
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 241

def semantic_tokens
  attributes.fetch(:semanticTokens)
end

#signature_helpSignatureHelpClientCapabilities

Capabilities specific to the ‘textDocument/signatureHelp` request.



70
71
72
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 70

def signature_help
  attributes.fetch(:signatureHelp)
end

#synchronizationTextDocumentSyncClientCapabilities



46
47
48
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 46

def synchronization
  attributes.fetch(:synchronization)
end

#to_hashObject



287
288
289
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 287

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



291
292
293
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 291

def to_json(*args)
  to_hash.to_json(*args)
end

#type_definitionTypeDefinitionClientCapabilities

Capabilities specific to the ‘textDocument/typeDefinition` request.



94
95
96
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 94

def type_definition
  attributes.fetch(:typeDefinition)
end

#type_hierarchyTypeHierarchyClientCapabilities

Capabilities specific to the various type hierarchy requests.

Returns:

  • (TypeHierarchyClientCapabilities)


257
258
259
# File 'lib/language_server/protocol/interface/text_document_client_capabilities.rb', line 257

def type_hierarchy
  attributes.fetch(:typeHierarchy)
end