-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from glennsarti/get-client-config
(GH-177) Add ability to fetch the client configuration
- Loading branch information
Showing
16 changed files
with
1,384 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# frozen_string_literal: true | ||
|
||
# DO NOT MODIFY. This file is built automatically | ||
# LSP Protocol: vscode-languageserver-protocol/lib/protocol.colorProvider.d.ts | ||
|
||
# rubocop:disable Layout/EmptyLinesAroundClassBody | ||
# rubocop:disable Lint/UselessAssignment | ||
# rubocop:disable Style/AsciiComments | ||
|
||
module LSP | ||
# export interface ColorClientCapabilities { | ||
# /** | ||
# * The text document client capabilities | ||
# */ | ||
# textDocument?: { | ||
# /** | ||
# * Capabilities specific to the colorProvider | ||
# */ | ||
# colorProvider?: { | ||
# /** | ||
# * Whether implementation supports dynamic registration. If this is set to `true` | ||
# * the client supports the new `(ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)` | ||
# * return value for the corresponding server capability as well. | ||
# */ | ||
# dynamicRegistration?: boolean; | ||
# }; | ||
# }; | ||
# } | ||
class ColorClientCapabilities < LSPBase | ||
attr_accessor :textDocument # type: { | ||
# /** | ||
# * Capabilities specific to the colorProvider | ||
# */ | ||
# colorProvider?: { | ||
# /** | ||
# * Whether implementation supports dynamic registration. If this is set to `true` | ||
# * the client supports the new `(ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)` | ||
# * return value for the corresponding server capability as well. | ||
# */ | ||
# dynamicRegistration?: boolean; | ||
# }; | ||
# } | ||
|
||
def initialize(initial_hash = nil) | ||
super | ||
@optional_method_names = %i[textDocument] | ||
end | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.textDocument = value['textDocument'] # Unknown type | ||
self | ||
end | ||
end | ||
|
||
# export interface ColorProviderOptions { | ||
# } | ||
class ColorProviderOptions < LSPBase | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self | ||
end | ||
end | ||
|
||
# export interface ColorServerCapabilities { | ||
# /** | ||
# * The server provides color provider support. | ||
# */ | ||
# colorProvider?: boolean | ColorProviderOptions | (ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
# } | ||
class ColorServerCapabilities < LSPBase | ||
attr_accessor :colorProvider # type: boolean | ColorProviderOptions | (ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions) | ||
|
||
def initialize(initial_hash = nil) | ||
super | ||
@optional_method_names = %i[colorProvider] | ||
end | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.colorProvider = value['colorProvider'] # Unknown type | ||
self | ||
end | ||
end | ||
|
||
# export interface DocumentColorParams { | ||
# /** | ||
# * The text document. | ||
# */ | ||
# textDocument: TextDocumentIdentifier; | ||
# } | ||
class DocumentColorParams < LSPBase | ||
attr_accessor :textDocument # type: TextDocumentIdentifier | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.textDocument = value['textDocument'] # Unknown type | ||
self | ||
end | ||
end | ||
|
||
# export interface ColorPresentationParams { | ||
# /** | ||
# * The text document. | ||
# */ | ||
# textDocument: TextDocumentIdentifier; | ||
# /** | ||
# * The color to request presentations for. | ||
# */ | ||
# color: Color; | ||
# /** | ||
# * The range where the color would be inserted. Serves as a context. | ||
# */ | ||
# range: Range; | ||
# } | ||
class ColorPresentationParams < LSPBase | ||
attr_accessor :textDocument # type: TextDocumentIdentifier | ||
attr_accessor :color # type: Color | ||
attr_accessor :range # type: Range | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.textDocument = value['textDocument'] # Unknown type | ||
self.color = value['color'] # Unknown type | ||
self.range = value['range'] # Unknown type | ||
self | ||
end | ||
end | ||
end | ||
|
||
# rubocop:enable Layout/EmptyLinesAroundClassBody | ||
# rubocop:enable Lint/UselessAssignment | ||
# rubocop:enable Style/AsciiComments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# frozen_string_literal: true | ||
|
||
# DO NOT MODIFY. This file is built automatically | ||
# LSP Protocol: vscode-languageserver-protocol/lib/protocol.configuration.d.ts | ||
|
||
# rubocop:disable Layout/EmptyLinesAroundClassBody | ||
# rubocop:disable Lint/UselessAssignment | ||
# rubocop:disable Style/AsciiComments | ||
|
||
module LSP | ||
# export interface ConfigurationClientCapabilities { | ||
# /** | ||
# * The workspace client capabilities | ||
# */ | ||
# workspace?: { | ||
# /** | ||
# * The client supports `workspace/configuration` requests. | ||
# */ | ||
# configuration?: boolean; | ||
# }; | ||
# } | ||
class ConfigurationClientCapabilities < LSPBase | ||
attr_accessor :workspace # type: { | ||
# /** | ||
# * The client supports `workspace/configuration` requests. | ||
# */ | ||
# configuration?: boolean; | ||
# } | ||
|
||
def initialize(initial_hash = nil) | ||
super | ||
@optional_method_names = %i[workspace] | ||
end | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.workspace = value['workspace'] # Unknown type | ||
self | ||
end | ||
end | ||
|
||
# export interface ConfigurationItem { | ||
# /** | ||
# * The scope to get the configuration section for. | ||
# */ | ||
# scopeUri?: string; | ||
# /** | ||
# * The configuration section asked for. | ||
# */ | ||
# section?: string; | ||
# } | ||
class ConfigurationItem < LSPBase | ||
attr_accessor :scopeUri # type: string | ||
attr_accessor :section # type: string | ||
|
||
def initialize(initial_hash = nil) | ||
super | ||
@optional_method_names = %i[scopeUri section] | ||
end | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.scopeUri = value['scopeUri'] | ||
self.section = value['section'] | ||
self | ||
end | ||
end | ||
|
||
# export interface ConfigurationParams { | ||
# items: ConfigurationItem[]; | ||
# } | ||
class ConfigurationParams < LSPBase | ||
attr_accessor :items # type: ConfigurationItem[] | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.items = to_typed_aray(value['items'], ConfigurationItem) | ||
self | ||
end | ||
end | ||
end | ||
|
||
# rubocop:enable Layout/EmptyLinesAroundClassBody | ||
# rubocop:enable Lint/UselessAssignment | ||
# rubocop:enable Style/AsciiComments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# frozen_string_literal: true | ||
|
||
# DO NOT MODIFY. This file is built automatically | ||
# LSP Protocol: vscode-languageserver-protocol/lib/protocol.declaration.d.ts | ||
|
||
# rubocop:disable Layout/EmptyLinesAroundClassBody | ||
# rubocop:disable Lint/UselessAssignment | ||
# rubocop:disable Style/AsciiComments | ||
|
||
module LSP | ||
# export interface DeclarationClientCapabilities { | ||
# /** | ||
# * The text document client capabilities | ||
# */ | ||
# textDocument?: { | ||
# /** | ||
# * Capabilities specific to the `textDocument/declaration` | ||
# */ | ||
# declaration?: { | ||
# /** | ||
# * Whether declaration supports dynamic registration. If this is set to `true` | ||
# * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` | ||
# * return value for the corresponding server capability as well. | ||
# */ | ||
# dynamicRegistration?: boolean; | ||
# /** | ||
# * The client supports additional metadata in the form of declaration links. | ||
# */ | ||
# linkSupport?: boolean; | ||
# }; | ||
# }; | ||
# } | ||
class DeclarationClientCapabilities < LSPBase | ||
attr_accessor :textDocument # type: { | ||
# /** | ||
# * Capabilities specific to the `textDocument/declaration` | ||
# */ | ||
# declaration?: { | ||
# /** | ||
# * Whether declaration supports dynamic registration. If this is set to `true` | ||
# * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` | ||
# * return value for the corresponding server capability as well. | ||
# */ | ||
# dynamicRegistration?: boolean; | ||
# /** | ||
# * The client supports additional metadata in the form of declaration links. | ||
# */ | ||
# linkSupport?: boolean; | ||
# }; | ||
# } | ||
|
||
def initialize(initial_hash = nil) | ||
super | ||
@optional_method_names = %i[textDocument] | ||
end | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.textDocument = value['textDocument'] # Unknown type | ||
self | ||
end | ||
end | ||
|
||
# export interface DeclarationServerCapabilities { | ||
# /** | ||
# * The server provides Goto Type Definition support. | ||
# */ | ||
# declarationProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
# } | ||
class DeclarationServerCapabilities < LSPBase | ||
attr_accessor :declarationProvider # type: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions) | ||
|
||
def initialize(initial_hash = nil) | ||
super | ||
@optional_method_names = %i[declarationProvider] | ||
end | ||
|
||
def from_h!(value) | ||
value = {} if value.nil? | ||
self.declarationProvider = value['declarationProvider'] # Unknown type | ||
self | ||
end | ||
end | ||
end | ||
|
||
# rubocop:enable Layout/EmptyLinesAroundClassBody | ||
# rubocop:enable Lint/UselessAssignment | ||
# rubocop:enable Style/AsciiComments |
Oops, something went wrong.