diff --git a/lib/gen_lsp/protocol/requests/call_hierarchy_incoming_calls.ex b/lib/gen_lsp/protocol/requests/call_hierarchy_incoming_calls.ex index dd4ce50..7b5b26f 100644 --- a/lib/gen_lsp/protocol/requests/call_hierarchy_incoming_calls.ex +++ b/lib/gen_lsp/protocol/requests/call_hierarchy_incoming_calls.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.CallHierarchyIncomingCalls do typedstruct do field :method, String.t(), default: "callHierarchy/incomingCalls" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CallHierarchyIncomingCallsParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.CallHierarchyIncomingCalls do schema(__MODULE__, %{ method: "callHierarchy/incomingCalls", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CallHierarchyIncomingCallsParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/call_hierarchy_outgoing_calls.ex b/lib/gen_lsp/protocol/requests/call_hierarchy_outgoing_calls.ex index 2500bf2..2e83ba0 100644 --- a/lib/gen_lsp/protocol/requests/call_hierarchy_outgoing_calls.ex +++ b/lib/gen_lsp/protocol/requests/call_hierarchy_outgoing_calls.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.CallHierarchyOutgoingCalls do typedstruct do field :method, String.t(), default: "callHierarchy/outgoingCalls" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CallHierarchyOutgoingCallsParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.CallHierarchyOutgoingCalls do schema(__MODULE__, %{ method: "callHierarchy/outgoingCalls", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CallHierarchyOutgoingCallsParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/client_register_capability.ex b/lib/gen_lsp/protocol/requests/client_register_capability.ex index da067dd..b6884f3 100644 --- a/lib/gen_lsp/protocol/requests/client_register_capability.ex +++ b/lib/gen_lsp/protocol/requests/client_register_capability.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Requests.ClientRegisterCapability do typedstruct do field :method, String.t(), default: "client/registerCapability" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.RegistrationParams.t() end @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.ClientRegisterCapability do schema(__MODULE__, %{ method: "client/registerCapability", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.RegistrationParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/client_unregister_capability.ex b/lib/gen_lsp/protocol/requests/client_unregister_capability.ex index e2260b0..c1158f5 100644 --- a/lib/gen_lsp/protocol/requests/client_unregister_capability.ex +++ b/lib/gen_lsp/protocol/requests/client_unregister_capability.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Requests.ClientUnregisterCapability do typedstruct do field :method, String.t(), default: "client/unregisterCapability" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.UnregistrationParams.t() end @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.ClientUnregisterCapability do schema(__MODULE__, %{ method: "client/unregisterCapability", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.UnregistrationParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/code_action_resolve.ex b/lib/gen_lsp/protocol/requests/code_action_resolve.ex index c15cb38..c1f9b9e 100644 --- a/lib/gen_lsp/protocol/requests/code_action_resolve.ex +++ b/lib/gen_lsp/protocol/requests/code_action_resolve.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.CodeActionResolve do typedstruct do field :method, String.t(), default: "codeAction/resolve" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CodeAction.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.CodeActionResolve do schema(__MODULE__, %{ method: "codeAction/resolve", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CodeAction.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/code_lens_resolve.ex b/lib/gen_lsp/protocol/requests/code_lens_resolve.ex index 440907e..8cfc433 100644 --- a/lib/gen_lsp/protocol/requests/code_lens_resolve.ex +++ b/lib/gen_lsp/protocol/requests/code_lens_resolve.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.CodeLensResolve do typedstruct do field :method, String.t(), default: "codeLens/resolve" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CodeLens.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.CodeLensResolve do schema(__MODULE__, %{ method: "codeLens/resolve", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CodeLens.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/completion_item_resolve.ex b/lib/gen_lsp/protocol/requests/completion_item_resolve.ex index 83e811a..d8d0c12 100644 --- a/lib/gen_lsp/protocol/requests/completion_item_resolve.ex +++ b/lib/gen_lsp/protocol/requests/completion_item_resolve.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.CompletionItemResolve do typedstruct do field :method, String.t(), default: "completionItem/resolve" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CompletionItem.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.CompletionItemResolve do schema(__MODULE__, %{ method: "completionItem/resolve", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CompletionItem.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/document_link_resolve.ex b/lib/gen_lsp/protocol/requests/document_link_resolve.ex index 1f605bc..615e7d9 100644 --- a/lib/gen_lsp/protocol/requests/document_link_resolve.ex +++ b/lib/gen_lsp/protocol/requests/document_link_resolve.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.DocumentLinkResolve do typedstruct do field :method, String.t(), default: "documentLink/resolve" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentLink.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.DocumentLinkResolve do schema(__MODULE__, %{ method: "documentLink/resolve", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentLink.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/initialize.ex b/lib/gen_lsp/protocol/requests/initialize.ex index 2ff45fc..3d8bc64 100644 --- a/lib/gen_lsp/protocol/requests/initialize.ex +++ b/lib/gen_lsp/protocol/requests/initialize.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Requests.Initialize do typedstruct do field :method, String.t(), default: "initialize" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.InitializeParams.t() end @@ -30,7 +30,7 @@ defmodule GenLSP.Requests.Initialize do schema(__MODULE__, %{ method: "initialize", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.InitializeParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/inlay_hint_resolve.ex b/lib/gen_lsp/protocol/requests/inlay_hint_resolve.ex index 663a2d7..87211c8 100644 --- a/lib/gen_lsp/protocol/requests/inlay_hint_resolve.ex +++ b/lib/gen_lsp/protocol/requests/inlay_hint_resolve.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Requests.InlayHintResolve do typedstruct do field :method, String.t(), default: "inlayHint/resolve" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.InlayHint.t() end @@ -30,7 +30,7 @@ defmodule GenLSP.Requests.InlayHintResolve do schema(__MODULE__, %{ method: "inlayHint/resolve", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.InlayHint.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/shutdown.ex b/lib/gen_lsp/protocol/requests/shutdown.ex index a61ef7d..4405bda 100644 --- a/lib/gen_lsp/protocol/requests/shutdown.ex +++ b/lib/gen_lsp/protocol/requests/shutdown.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.Shutdown do typedstruct do field :method, String.t(), default: "shutdown" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: nil @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.Shutdown do schema(__MODULE__, %{ method: "shutdown", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_code_action.ex b/lib/gen_lsp/protocol/requests/text_document_code_action.ex index 1022a3a..7fdbec9 100644 --- a/lib/gen_lsp/protocol/requests/text_document_code_action.ex +++ b/lib/gen_lsp/protocol/requests/text_document_code_action.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentCodeAction do typedstruct do field :method, String.t(), default: "textDocument/codeAction" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CodeActionParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentCodeAction do schema(__MODULE__, %{ method: "textDocument/codeAction", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CodeActionParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_code_lens.ex b/lib/gen_lsp/protocol/requests/text_document_code_lens.ex index 32201b3..b24d8e8 100644 --- a/lib/gen_lsp/protocol/requests/text_document_code_lens.ex +++ b/lib/gen_lsp/protocol/requests/text_document_code_lens.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentCodeLens do typedstruct do field :method, String.t(), default: "textDocument/codeLens" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CodeLensParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentCodeLens do schema(__MODULE__, %{ method: "textDocument/codeLens", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CodeLensParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_color_presentation.ex b/lib/gen_lsp/protocol/requests/text_document_color_presentation.ex index 50913b4..20f9fdd 100644 --- a/lib/gen_lsp/protocol/requests/text_document_color_presentation.ex +++ b/lib/gen_lsp/protocol/requests/text_document_color_presentation.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentColorPresentation do typedstruct do field :method, String.t(), default: "textDocument/colorPresentation" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ColorPresentationParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentColorPresentation do schema(__MODULE__, %{ method: "textDocument/colorPresentation", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ColorPresentationParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_completion.ex b/lib/gen_lsp/protocol/requests/text_document_completion.ex index 9ef7382..9fe63dc 100644 --- a/lib/gen_lsp/protocol/requests/text_document_completion.ex +++ b/lib/gen_lsp/protocol/requests/text_document_completion.ex @@ -22,7 +22,7 @@ defmodule GenLSP.Requests.TextDocumentCompletion do typedstruct do field :method, String.t(), default: "textDocument/completion" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CompletionParams.t() end @@ -35,7 +35,7 @@ defmodule GenLSP.Requests.TextDocumentCompletion do schema(__MODULE__, %{ method: "textDocument/completion", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CompletionParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_declaration.ex b/lib/gen_lsp/protocol/requests/text_document_declaration.ex index 89b9a21..1261ce1 100644 --- a/lib/gen_lsp/protocol/requests/text_document_declaration.ex +++ b/lib/gen_lsp/protocol/requests/text_document_declaration.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Requests.TextDocumentDeclaration do typedstruct do field :method, String.t(), default: "textDocument/declaration" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DeclarationParams.t() end @@ -31,7 +31,7 @@ defmodule GenLSP.Requests.TextDocumentDeclaration do schema(__MODULE__, %{ method: "textDocument/declaration", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DeclarationParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_definition.ex b/lib/gen_lsp/protocol/requests/text_document_definition.ex index 75575e7..c3902a8 100644 --- a/lib/gen_lsp/protocol/requests/text_document_definition.ex +++ b/lib/gen_lsp/protocol/requests/text_document_definition.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Requests.TextDocumentDefinition do typedstruct do field :method, String.t(), default: "textDocument/definition" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DefinitionParams.t() end @@ -31,7 +31,7 @@ defmodule GenLSP.Requests.TextDocumentDefinition do schema(__MODULE__, %{ method: "textDocument/definition", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DefinitionParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_diagnostic.ex b/lib/gen_lsp/protocol/requests/text_document_diagnostic.ex index 11d52c0..6c23288 100644 --- a/lib/gen_lsp/protocol/requests/text_document_diagnostic.ex +++ b/lib/gen_lsp/protocol/requests/text_document_diagnostic.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TextDocumentDiagnostic do typedstruct do field :method, String.t(), default: "textDocument/diagnostic" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentDiagnosticParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TextDocumentDiagnostic do schema(__MODULE__, %{ method: "textDocument/diagnostic", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentDiagnosticParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_document_color.ex b/lib/gen_lsp/protocol/requests/text_document_document_color.ex index 591b142..ce403b7 100644 --- a/lib/gen_lsp/protocol/requests/text_document_document_color.ex +++ b/lib/gen_lsp/protocol/requests/text_document_document_color.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentColor do typedstruct do field :method, String.t(), default: "textDocument/documentColor" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentColorParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentColor do schema(__MODULE__, %{ method: "textDocument/documentColor", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentColorParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_document_highlight.ex b/lib/gen_lsp/protocol/requests/text_document_document_highlight.ex index 3019421..4868b79 100644 --- a/lib/gen_lsp/protocol/requests/text_document_document_highlight.ex +++ b/lib/gen_lsp/protocol/requests/text_document_document_highlight.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentHighlight do typedstruct do field :method, String.t(), default: "textDocument/documentHighlight" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentHighlightParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentHighlight do schema(__MODULE__, %{ method: "textDocument/documentHighlight", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentHighlightParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_document_link.ex b/lib/gen_lsp/protocol/requests/text_document_document_link.ex index 5de3158..3e8cb8b 100644 --- a/lib/gen_lsp/protocol/requests/text_document_document_link.ex +++ b/lib/gen_lsp/protocol/requests/text_document_document_link.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentLink do typedstruct do field :method, String.t(), default: "textDocument/documentLink" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentLinkParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentLink do schema(__MODULE__, %{ method: "textDocument/documentLink", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentLinkParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_document_symbol.ex b/lib/gen_lsp/protocol/requests/text_document_document_symbol.ex index 0fc6ebc..71aeccb 100644 --- a/lib/gen_lsp/protocol/requests/text_document_document_symbol.ex +++ b/lib/gen_lsp/protocol/requests/text_document_document_symbol.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentSymbol do typedstruct do field :method, String.t(), default: "textDocument/documentSymbol" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentSymbolParams.t() end @@ -32,7 +32,7 @@ defmodule GenLSP.Requests.TextDocumentDocumentSymbol do schema(__MODULE__, %{ method: "textDocument/documentSymbol", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentSymbolParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_folding_range.ex b/lib/gen_lsp/protocol/requests/text_document_folding_range.ex index deb678b..24462d9 100644 --- a/lib/gen_lsp/protocol/requests/text_document_folding_range.ex +++ b/lib/gen_lsp/protocol/requests/text_document_folding_range.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentFoldingRange do typedstruct do field :method, String.t(), default: "textDocument/foldingRange" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.FoldingRangeParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentFoldingRange do schema(__MODULE__, %{ method: "textDocument/foldingRange", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.FoldingRangeParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_formatting.ex b/lib/gen_lsp/protocol/requests/text_document_formatting.ex index 2bf1cc5..68b2ea1 100644 --- a/lib/gen_lsp/protocol/requests/text_document_formatting.ex +++ b/lib/gen_lsp/protocol/requests/text_document_formatting.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentFormatting do typedstruct do field :method, String.t(), default: "textDocument/formatting" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentFormattingParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentFormatting do schema(__MODULE__, %{ method: "textDocument/formatting", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentFormattingParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_hover.ex b/lib/gen_lsp/protocol/requests/text_document_hover.ex index e9e2615..a198f5e 100644 --- a/lib/gen_lsp/protocol/requests/text_document_hover.ex +++ b/lib/gen_lsp/protocol/requests/text_document_hover.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TextDocumentHover do typedstruct do field :method, String.t(), default: "textDocument/hover" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.HoverParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TextDocumentHover do schema(__MODULE__, %{ method: "textDocument/hover", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.HoverParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_implementation.ex b/lib/gen_lsp/protocol/requests/text_document_implementation.ex index 12c4019..5b7cc84 100644 --- a/lib/gen_lsp/protocol/requests/text_document_implementation.ex +++ b/lib/gen_lsp/protocol/requests/text_document_implementation.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentImplementation do typedstruct do field :method, String.t(), default: "textDocument/implementation" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ImplementationParams.t() end @@ -30,7 +30,7 @@ defmodule GenLSP.Requests.TextDocumentImplementation do schema(__MODULE__, %{ method: "textDocument/implementation", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ImplementationParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_inlay_hint.ex b/lib/gen_lsp/protocol/requests/text_document_inlay_hint.ex index 12f57aa..8af08a0 100644 --- a/lib/gen_lsp/protocol/requests/text_document_inlay_hint.ex +++ b/lib/gen_lsp/protocol/requests/text_document_inlay_hint.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Requests.TextDocumentInlayHint do typedstruct do field :method, String.t(), default: "textDocument/inlayHint" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.InlayHintParams.t() end @@ -30,7 +30,7 @@ defmodule GenLSP.Requests.TextDocumentInlayHint do schema(__MODULE__, %{ method: "textDocument/inlayHint", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.InlayHintParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_inline_value.ex b/lib/gen_lsp/protocol/requests/text_document_inline_value.ex index af82d75..f764501 100644 --- a/lib/gen_lsp/protocol/requests/text_document_inline_value.ex +++ b/lib/gen_lsp/protocol/requests/text_document_inline_value.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Requests.TextDocumentInlineValue do typedstruct do field :method, String.t(), default: "textDocument/inlineValue" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.InlineValueParams.t() end @@ -30,7 +30,7 @@ defmodule GenLSP.Requests.TextDocumentInlineValue do schema(__MODULE__, %{ method: "textDocument/inlineValue", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.InlineValueParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_linked_editing_range.ex b/lib/gen_lsp/protocol/requests/text_document_linked_editing_range.ex index abed5b0..e7ff64c 100644 --- a/lib/gen_lsp/protocol/requests/text_document_linked_editing_range.ex +++ b/lib/gen_lsp/protocol/requests/text_document_linked_editing_range.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TextDocumentLinkedEditingRange do typedstruct do field :method, String.t(), default: "textDocument/linkedEditingRange" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.LinkedEditingRangeParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TextDocumentLinkedEditingRange do schema(__MODULE__, %{ method: "textDocument/linkedEditingRange", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.LinkedEditingRangeParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_moniker.ex b/lib/gen_lsp/protocol/requests/text_document_moniker.ex index 50c6e07..751e04a 100644 --- a/lib/gen_lsp/protocol/requests/text_document_moniker.ex +++ b/lib/gen_lsp/protocol/requests/text_document_moniker.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TextDocumentMoniker do typedstruct do field :method, String.t(), default: "textDocument/moniker" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.MonikerParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TextDocumentMoniker do schema(__MODULE__, %{ method: "textDocument/moniker", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.MonikerParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_on_type_formatting.ex b/lib/gen_lsp/protocol/requests/text_document_on_type_formatting.ex index 89d136e..e7ab03e 100644 --- a/lib/gen_lsp/protocol/requests/text_document_on_type_formatting.ex +++ b/lib/gen_lsp/protocol/requests/text_document_on_type_formatting.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentOnTypeFormatting do typedstruct do field :method, String.t(), default: "textDocument/onTypeFormatting" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentOnTypeFormattingParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentOnTypeFormatting do schema(__MODULE__, %{ method: "textDocument/onTypeFormatting", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentOnTypeFormattingParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_prepare_call_hierarchy.ex b/lib/gen_lsp/protocol/requests/text_document_prepare_call_hierarchy.ex index c8c2504..d7a3967 100644 --- a/lib/gen_lsp/protocol/requests/text_document_prepare_call_hierarchy.ex +++ b/lib/gen_lsp/protocol/requests/text_document_prepare_call_hierarchy.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentPrepareCallHierarchy do typedstruct do field :method, String.t(), default: "textDocument/prepareCallHierarchy" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CallHierarchyPrepareParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentPrepareCallHierarchy do schema(__MODULE__, %{ method: "textDocument/prepareCallHierarchy", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CallHierarchyPrepareParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_prepare_rename.ex b/lib/gen_lsp/protocol/requests/text_document_prepare_rename.ex index edb1c54..7927d5f 100644 --- a/lib/gen_lsp/protocol/requests/text_document_prepare_rename.ex +++ b/lib/gen_lsp/protocol/requests/text_document_prepare_rename.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TextDocumentPrepareRename do typedstruct do field :method, String.t(), default: "textDocument/prepareRename" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.PrepareRenameParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TextDocumentPrepareRename do schema(__MODULE__, %{ method: "textDocument/prepareRename", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.PrepareRenameParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_prepare_type_hierarchy.ex b/lib/gen_lsp/protocol/requests/text_document_prepare_type_hierarchy.ex index b0d196d..3d3c370 100644 --- a/lib/gen_lsp/protocol/requests/text_document_prepare_type_hierarchy.ex +++ b/lib/gen_lsp/protocol/requests/text_document_prepare_type_hierarchy.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentPrepareTypeHierarchy do typedstruct do field :method, String.t(), default: "textDocument/prepareTypeHierarchy" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.TypeHierarchyPrepareParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentPrepareTypeHierarchy do schema(__MODULE__, %{ method: "textDocument/prepareTypeHierarchy", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.TypeHierarchyPrepareParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_range_formatting.ex b/lib/gen_lsp/protocol/requests/text_document_range_formatting.ex index 60a46e1..974c53e 100644 --- a/lib/gen_lsp/protocol/requests/text_document_range_formatting.ex +++ b/lib/gen_lsp/protocol/requests/text_document_range_formatting.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentRangeFormatting do typedstruct do field :method, String.t(), default: "textDocument/rangeFormatting" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DocumentRangeFormattingParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentRangeFormatting do schema(__MODULE__, %{ method: "textDocument/rangeFormatting", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DocumentRangeFormattingParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_references.ex b/lib/gen_lsp/protocol/requests/text_document_references.ex index 9bd2804..e18f031 100644 --- a/lib/gen_lsp/protocol/requests/text_document_references.ex +++ b/lib/gen_lsp/protocol/requests/text_document_references.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentReferences do typedstruct do field :method, String.t(), default: "textDocument/references" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ReferenceParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentReferences do schema(__MODULE__, %{ method: "textDocument/references", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ReferenceParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_rename.ex b/lib/gen_lsp/protocol/requests/text_document_rename.ex index 9ab1e99..dc762c5 100644 --- a/lib/gen_lsp/protocol/requests/text_document_rename.ex +++ b/lib/gen_lsp/protocol/requests/text_document_rename.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentRename do typedstruct do field :method, String.t(), default: "textDocument/rename" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.RenameParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentRename do schema(__MODULE__, %{ method: "textDocument/rename", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.RenameParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_selection_range.ex b/lib/gen_lsp/protocol/requests/text_document_selection_range.ex index e5c1b14..53f0bce 100644 --- a/lib/gen_lsp/protocol/requests/text_document_selection_range.ex +++ b/lib/gen_lsp/protocol/requests/text_document_selection_range.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentSelectionRange do typedstruct do field :method, String.t(), default: "textDocument/selectionRange" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.SelectionRangeParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.TextDocumentSelectionRange do schema(__MODULE__, %{ method: "textDocument/selectionRange", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.SelectionRangeParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full.ex b/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full.ex index d281f84..8c4fbf6 100644 --- a/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full.ex +++ b/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentSemanticTokensFull do typedstruct do field :method, String.t(), default: "textDocument/semanticTokens/full" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.SemanticTokensParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentSemanticTokensFull do schema(__MODULE__, %{ method: "textDocument/semanticTokens/full", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.SemanticTokensParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full_delta.ex b/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full_delta.ex index 73feb37..94cb400 100644 --- a/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full_delta.ex +++ b/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_full_delta.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentSemanticTokensFullDelta do typedstruct do field :method, String.t(), default: "textDocument/semanticTokens/full/delta" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.SemanticTokensDeltaParams.t() end @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.TextDocumentSemanticTokensFullDelta do schema(__MODULE__, %{ method: "textDocument/semanticTokens/full/delta", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.SemanticTokensDeltaParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_range.ex b/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_range.ex index 59e9173..88882a6 100644 --- a/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_range.ex +++ b/lib/gen_lsp/protocol/requests/text_document_semantic_tokens_range.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.TextDocumentSemanticTokensRange do typedstruct do field :method, String.t(), default: "textDocument/semanticTokens/range" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.SemanticTokensRangeParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.TextDocumentSemanticTokensRange do schema(__MODULE__, %{ method: "textDocument/semanticTokens/range", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.SemanticTokensRangeParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_signature_help.ex b/lib/gen_lsp/protocol/requests/text_document_signature_help.ex index 2d7a128..6b3a126 100644 --- a/lib/gen_lsp/protocol/requests/text_document_signature_help.ex +++ b/lib/gen_lsp/protocol/requests/text_document_signature_help.ex @@ -8,7 +8,7 @@ defmodule GenLSP.Requests.TextDocumentSignatureHelp do typedstruct do field :method, String.t(), default: "textDocument/signatureHelp" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.SignatureHelpParams.t() end @@ -20,7 +20,7 @@ defmodule GenLSP.Requests.TextDocumentSignatureHelp do schema(__MODULE__, %{ method: "textDocument/signatureHelp", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.SignatureHelpParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_type_definition.ex b/lib/gen_lsp/protocol/requests/text_document_type_definition.ex index 8ccf317..ed7ec95 100644 --- a/lib/gen_lsp/protocol/requests/text_document_type_definition.ex +++ b/lib/gen_lsp/protocol/requests/text_document_type_definition.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.TextDocumentTypeDefinition do typedstruct do field :method, String.t(), default: "textDocument/typeDefinition" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.TypeDefinitionParams.t() end @@ -30,7 +30,7 @@ defmodule GenLSP.Requests.TextDocumentTypeDefinition do schema(__MODULE__, %{ method: "textDocument/typeDefinition", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.TypeDefinitionParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/text_document_will_save_wait_until.ex b/lib/gen_lsp/protocol/requests/text_document_will_save_wait_until.ex index 7b1062d..7437f63 100644 --- a/lib/gen_lsp/protocol/requests/text_document_will_save_wait_until.ex +++ b/lib/gen_lsp/protocol/requests/text_document_will_save_wait_until.ex @@ -19,7 +19,7 @@ defmodule GenLSP.Requests.TextDocumentWillSaveWaitUntil do typedstruct do field :method, String.t(), default: "textDocument/willSaveWaitUntil" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.WillSaveTextDocumentParams.t() end @@ -31,7 +31,7 @@ defmodule GenLSP.Requests.TextDocumentWillSaveWaitUntil do schema(__MODULE__, %{ method: "textDocument/willSaveWaitUntil", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.WillSaveTextDocumentParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/type_hierarchy_subtypes.ex b/lib/gen_lsp/protocol/requests/type_hierarchy_subtypes.ex index 71981ba..561d315 100644 --- a/lib/gen_lsp/protocol/requests/type_hierarchy_subtypes.ex +++ b/lib/gen_lsp/protocol/requests/type_hierarchy_subtypes.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TypeHierarchySubtypes do typedstruct do field :method, String.t(), default: "typeHierarchy/subtypes" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.TypeHierarchySubtypesParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TypeHierarchySubtypes do schema(__MODULE__, %{ method: "typeHierarchy/subtypes", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.TypeHierarchySubtypesParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/type_hierarchy_supertypes.ex b/lib/gen_lsp/protocol/requests/type_hierarchy_supertypes.ex index b723c3c..e0286c4 100644 --- a/lib/gen_lsp/protocol/requests/type_hierarchy_supertypes.ex +++ b/lib/gen_lsp/protocol/requests/type_hierarchy_supertypes.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.TypeHierarchySupertypes do typedstruct do field :method, String.t(), default: "typeHierarchy/supertypes" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.TypeHierarchySupertypesParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.TypeHierarchySupertypes do schema(__MODULE__, %{ method: "typeHierarchy/supertypes", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.TypeHierarchySupertypesParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/window_show_document.ex b/lib/gen_lsp/protocol/requests/window_show_document.ex index 576d106..f377a6a 100644 --- a/lib/gen_lsp/protocol/requests/window_show_document.ex +++ b/lib/gen_lsp/protocol/requests/window_show_document.ex @@ -19,7 +19,7 @@ defmodule GenLSP.Requests.WindowShowDocument do typedstruct do field :method, String.t(), default: "window/showDocument" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ShowDocumentParams.t() end @@ -31,7 +31,7 @@ defmodule GenLSP.Requests.WindowShowDocument do schema(__MODULE__, %{ method: "window/showDocument", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ShowDocumentParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/window_show_message_request.ex b/lib/gen_lsp/protocol/requests/window_show_message_request.ex index 6bd29fa..cc905cb 100644 --- a/lib/gen_lsp/protocol/requests/window_show_message_request.ex +++ b/lib/gen_lsp/protocol/requests/window_show_message_request.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Requests.WindowShowMessageRequest do typedstruct do field :method, String.t(), default: "window/showMessageRequest" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ShowMessageRequestParams.t() end @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.WindowShowMessageRequest do schema(__MODULE__, %{ method: "window/showMessageRequest", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ShowMessageRequestParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/window_work_done_progress_create.ex b/lib/gen_lsp/protocol/requests/window_work_done_progress_create.ex index e10993b..a1e6691 100644 --- a/lib/gen_lsp/protocol/requests/window_work_done_progress_create.ex +++ b/lib/gen_lsp/protocol/requests/window_work_done_progress_create.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Requests.WindowWorkDoneProgressCreate do typedstruct do field :method, String.t(), default: "window/workDoneProgress/create" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.WorkDoneProgressCreateParams.t() end @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.WindowWorkDoneProgressCreate do schema(__MODULE__, %{ method: "window/workDoneProgress/create", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.WorkDoneProgressCreateParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_apply_edit.ex b/lib/gen_lsp/protocol/requests/workspace_apply_edit.ex index 47bb48d..59f39b7 100644 --- a/lib/gen_lsp/protocol/requests/workspace_apply_edit.ex +++ b/lib/gen_lsp/protocol/requests/workspace_apply_edit.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.WorkspaceApplyEdit do typedstruct do field :method, String.t(), default: "workspace/applyEdit" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ApplyWorkspaceEditParams.t() end @@ -26,7 +26,7 @@ defmodule GenLSP.Requests.WorkspaceApplyEdit do schema(__MODULE__, %{ method: "workspace/applyEdit", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ApplyWorkspaceEditParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_code_lens_refresh.ex b/lib/gen_lsp/protocol/requests/workspace_code_lens_refresh.ex index ebe9096..619fef1 100644 --- a/lib/gen_lsp/protocol/requests/workspace_code_lens_refresh.ex +++ b/lib/gen_lsp/protocol/requests/workspace_code_lens_refresh.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.WorkspaceCodeLensRefresh do typedstruct do field :method, String.t(), default: "workspace/codeLens/refresh" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: nil @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.WorkspaceCodeLensRefresh do schema(__MODULE__, %{ method: "workspace/codeLens/refresh", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_configuration.ex b/lib/gen_lsp/protocol/requests/workspace_configuration.ex index 1f7d403..0bf883b 100644 --- a/lib/gen_lsp/protocol/requests/workspace_configuration.ex +++ b/lib/gen_lsp/protocol/requests/workspace_configuration.ex @@ -20,7 +20,7 @@ defmodule GenLSP.Requests.WorkspaceConfiguration do typedstruct do field :method, String.t(), default: "workspace/configuration" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ConfigurationParams.t() end @@ -32,7 +32,7 @@ defmodule GenLSP.Requests.WorkspaceConfiguration do schema(__MODULE__, %{ method: "workspace/configuration", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ConfigurationParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_diagnostic.ex b/lib/gen_lsp/protocol/requests/workspace_diagnostic.ex index 6fea2fd..4627115 100644 --- a/lib/gen_lsp/protocol/requests/workspace_diagnostic.ex +++ b/lib/gen_lsp/protocol/requests/workspace_diagnostic.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.WorkspaceDiagnostic do typedstruct do field :method, String.t(), default: "workspace/diagnostic" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.WorkspaceDiagnosticParams.t() end @@ -28,7 +28,7 @@ defmodule GenLSP.Requests.WorkspaceDiagnostic do schema(__MODULE__, %{ method: "workspace/diagnostic", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.WorkspaceDiagnosticParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_diagnostic_refresh.ex b/lib/gen_lsp/protocol/requests/workspace_diagnostic_refresh.ex index b75cba6..941a6d3 100644 --- a/lib/gen_lsp/protocol/requests/workspace_diagnostic_refresh.ex +++ b/lib/gen_lsp/protocol/requests/workspace_diagnostic_refresh.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Requests.WorkspaceDiagnosticRefresh do typedstruct do field :method, String.t(), default: "workspace/diagnostic/refresh" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: nil @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.WorkspaceDiagnosticRefresh do schema(__MODULE__, %{ method: "workspace/diagnostic/refresh", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_execute_command.ex b/lib/gen_lsp/protocol/requests/workspace_execute_command.ex index bf33c73..8da30fd 100644 --- a/lib/gen_lsp/protocol/requests/workspace_execute_command.ex +++ b/lib/gen_lsp/protocol/requests/workspace_execute_command.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Requests.WorkspaceExecuteCommand do typedstruct do field :method, String.t(), default: "workspace/executeCommand" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.ExecuteCommandParams.t() end @@ -27,7 +27,7 @@ defmodule GenLSP.Requests.WorkspaceExecuteCommand do schema(__MODULE__, %{ method: "workspace/executeCommand", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.ExecuteCommandParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_inlay_hint_refresh.ex b/lib/gen_lsp/protocol/requests/workspace_inlay_hint_refresh.ex index 45974dd..fc9c244 100644 --- a/lib/gen_lsp/protocol/requests/workspace_inlay_hint_refresh.ex +++ b/lib/gen_lsp/protocol/requests/workspace_inlay_hint_refresh.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.WorkspaceInlayHintRefresh do typedstruct do field :method, String.t(), default: "workspace/inlayHint/refresh" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: nil @@ -25,7 +25,7 @@ defmodule GenLSP.Requests.WorkspaceInlayHintRefresh do schema(__MODULE__, %{ method: "workspace/inlayHint/refresh", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_inline_value_refresh.ex b/lib/gen_lsp/protocol/requests/workspace_inline_value_refresh.ex index 3ac7af8..404eb8e 100644 --- a/lib/gen_lsp/protocol/requests/workspace_inline_value_refresh.ex +++ b/lib/gen_lsp/protocol/requests/workspace_inline_value_refresh.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.WorkspaceInlineValueRefresh do typedstruct do field :method, String.t(), default: "workspace/inlineValue/refresh" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: nil @@ -25,7 +25,7 @@ defmodule GenLSP.Requests.WorkspaceInlineValueRefresh do schema(__MODULE__, %{ method: "workspace/inlineValue/refresh", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_semantic_tokens_refresh.ex b/lib/gen_lsp/protocol/requests/workspace_semantic_tokens_refresh.ex index 436ecab..a6ced97 100644 --- a/lib/gen_lsp/protocol/requests/workspace_semantic_tokens_refresh.ex +++ b/lib/gen_lsp/protocol/requests/workspace_semantic_tokens_refresh.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.WorkspaceSemanticTokensRefresh do typedstruct do field :method, String.t(), default: "workspace/semanticTokens/refresh" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: nil @@ -25,7 +25,7 @@ defmodule GenLSP.Requests.WorkspaceSemanticTokensRefresh do schema(__MODULE__, %{ method: "workspace/semanticTokens/refresh", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_symbol.ex b/lib/gen_lsp/protocol/requests/workspace_symbol.ex index f14b076..53fea70 100644 --- a/lib/gen_lsp/protocol/requests/workspace_symbol.ex +++ b/lib/gen_lsp/protocol/requests/workspace_symbol.ex @@ -22,7 +22,7 @@ defmodule GenLSP.Requests.WorkspaceSymbol do typedstruct do field :method, String.t(), default: "workspace/symbol" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.WorkspaceSymbolParams.t() end @@ -37,7 +37,7 @@ defmodule GenLSP.Requests.WorkspaceSymbol do schema(__MODULE__, %{ method: "workspace/symbol", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.WorkspaceSymbolParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_symbol_resolve.ex b/lib/gen_lsp/protocol/requests/workspace_symbol_resolve.ex index 3fba8d1..a5e1f94 100644 --- a/lib/gen_lsp/protocol/requests/workspace_symbol_resolve.ex +++ b/lib/gen_lsp/protocol/requests/workspace_symbol_resolve.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.WorkspaceSymbolResolve do typedstruct do field :method, String.t(), default: "workspaceSymbol/resolve" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.WorkspaceSymbol.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.WorkspaceSymbolResolve do schema(__MODULE__, %{ method: "workspaceSymbol/resolve", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.WorkspaceSymbol.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_will_create_files.ex b/lib/gen_lsp/protocol/requests/workspace_will_create_files.ex index 96bb937..0622785 100644 --- a/lib/gen_lsp/protocol/requests/workspace_will_create_files.ex +++ b/lib/gen_lsp/protocol/requests/workspace_will_create_files.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.WorkspaceWillCreateFiles do typedstruct do field :method, String.t(), default: "workspace/willCreateFiles" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.CreateFilesParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.WorkspaceWillCreateFiles do schema(__MODULE__, %{ method: "workspace/willCreateFiles", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.CreateFilesParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_will_delete_files.ex b/lib/gen_lsp/protocol/requests/workspace_will_delete_files.ex index b54c8e2..9ab9c64 100644 --- a/lib/gen_lsp/protocol/requests/workspace_will_delete_files.ex +++ b/lib/gen_lsp/protocol/requests/workspace_will_delete_files.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.WorkspaceWillDeleteFiles do typedstruct do field :method, String.t(), default: "workspace/willDeleteFiles" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.DeleteFilesParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.WorkspaceWillDeleteFiles do schema(__MODULE__, %{ method: "workspace/willDeleteFiles", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.DeleteFilesParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_will_rename_files.ex b/lib/gen_lsp/protocol/requests/workspace_will_rename_files.ex index 0aa30af..1f6a202 100644 --- a/lib/gen_lsp/protocol/requests/workspace_will_rename_files.ex +++ b/lib/gen_lsp/protocol/requests/workspace_will_rename_files.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Requests.WorkspaceWillRenameFiles do typedstruct do field :method, String.t(), default: "workspace/willRenameFiles" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true field :params, GenLSP.Structures.RenameFilesParams.t() end @@ -29,7 +29,7 @@ defmodule GenLSP.Requests.WorkspaceWillRenameFiles do schema(__MODULE__, %{ method: "workspace/willRenameFiles", jsonrpc: "2.0", - id: int(), + id: oneof([int(), str()]), params: GenLSP.Structures.RenameFilesParams.schema() }) end diff --git a/lib/gen_lsp/protocol/requests/workspace_workspace_folders.ex b/lib/gen_lsp/protocol/requests/workspace_workspace_folders.ex index 67d031f..1a0e87d 100644 --- a/lib/gen_lsp/protocol/requests/workspace_workspace_folders.ex +++ b/lib/gen_lsp/protocol/requests/workspace_workspace_folders.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Requests.WorkspaceWorkspaceFolders do typedstruct do field :method, String.t(), default: "workspace/workspaceFolders" field :jsonrpc, String.t(), default: "2.0" - field :id, integer(), enforce: true + field :id, integer() | String.t(), enforce: true end @type result :: list(GenLSP.Structures.WorkspaceFolder.t()) | nil @@ -25,7 +25,7 @@ defmodule GenLSP.Requests.WorkspaceWorkspaceFolders do schema(__MODULE__, %{ method: "workspace/workspaceFolders", jsonrpc: "2.0", - id: int() + id: oneof([int(), str()]) }) end diff --git a/lib/gen_lsp/protocol/structures/base_symbol_information.ex b/lib/gen_lsp/protocol/structures/base_symbol_information.ex index 6fd55b4..069cae4 100644 --- a/lib/gen_lsp/protocol/structures/base_symbol_information.ex +++ b/lib/gen_lsp/protocol/structures/base_symbol_information.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Structures.BaseSymbolInformation do * name: The name of this symbol. * kind: The kind of this symbol. * tags: Tags for this symbol. - + @since 3.16.0 * container_name: The name of the symbol containing this symbol. This information is for user interface purposes (e.g. to render a qualifier in the user interface diff --git a/lib/gen_lsp/protocol/structures/client_capabilities.ex b/lib/gen_lsp/protocol/structures/client_capabilities.ex index f8d0044..ab0a645 100644 --- a/lib/gen_lsp/protocol/structures/client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/client_capabilities.ex @@ -14,11 +14,11 @@ defmodule GenLSP.Structures.ClientCapabilities do * workspace: Workspace specific client capabilities. * text_document: Text document specific client capabilities. * notebook_document: Capabilities specific to the notebook document support. - + @since 3.17.0 * window: Window specific client capabilities. * general: General client capabilities. - + @since 3.16.0 * experimental: Experimental client capabilities. """ diff --git a/lib/gen_lsp/protocol/structures/code_action.ex b/lib/gen_lsp/protocol/structures/code_action.ex index dfa1f26..f7829f5 100644 --- a/lib/gen_lsp/protocol/structures/code_action.ex +++ b/lib/gen_lsp/protocol/structures/code_action.ex @@ -16,30 +16,30 @@ defmodule GenLSP.Structures.CodeAction do * title: A short, human-readable, title for this code action. * kind: The kind of the code action. - + Used to filter code actions. * diagnostics: The diagnostics that this code action resolves. * is_preferred: Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted by keybindings. - + A quick fix should be marked preferred if it properly addresses the underlying error. A refactoring should be marked preferred if it is the most reasonable choice of actions to take. - + @since 3.15.0 * disabled: Marks that the code action cannot currently be applied. - + Clients should follow the following guidelines regarding disabled code actions: - + - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) code action menus. - + - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type of code action, such as refactorings. - + - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) that auto applies a code action and only disabled code actions are returned, the client should show the user an error message with `reason` in the editor. - + @since 3.16.0 * edit: The workspace edit this code action performs. * command: A command this code action executes. If a code action @@ -47,7 +47,7 @@ defmodule GenLSP.Structures.CodeAction do executed and then the command. * data: A data entry field that is preserved on a code action between a `textDocument/codeAction` and a `codeAction/resolve` request. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/code_action_client_capabilities.ex b/lib/gen_lsp/protocol/structures/code_action_client_capabilities.ex index f26b993..595721c 100644 --- a/lib/gen_lsp/protocol/structures/code_action_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/code_action_client_capabilities.ex @@ -15,29 +15,29 @@ defmodule GenLSP.Structures.CodeActionClientCapabilities do * code_action_literal_support: The client support code action literals of type `CodeAction` as a valid response of the `textDocument/codeAction` request. If the property is not set the request can only return `Command` literals. - + @since 3.8.0 * is_preferred_support: Whether code action supports the `isPreferred` property. - + @since 3.15.0 * disabled_support: Whether code action supports the `disabled` property. - + @since 3.16.0 * data_support: Whether code action supports the `data` property which is preserved between a `textDocument/codeAction` and a `codeAction/resolve` request. - + @since 3.16.0 * resolve_support: Whether the client supports resolving additional code action properties via a separate `codeAction/resolve` request. - + @since 3.16.0 * honors_change_annotations: Whether the client honors the change annotations in text edits and resource operations returned via the `CodeAction#edit` property by for example presenting the workspace edit in the user interface and asking for confirmation. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/code_action_context.ex b/lib/gen_lsp/protocol/structures/code_action_context.ex index 72ac29f..ccacf5e 100644 --- a/lib/gen_lsp/protocol/structures/code_action_context.ex +++ b/lib/gen_lsp/protocol/structures/code_action_context.ex @@ -18,11 +18,11 @@ defmodule GenLSP.Structures.CodeActionContext do that these accurately reflect the error state of the resource. The primary parameter to compute code actions is the provided range. * only: Requested kind of actions to return. - + Actions not of this kind are filtered out by the client before being shown. So servers can omit computing them. * trigger_kind: The reason why code actions were requested. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/code_action_options.ex b/lib/gen_lsp/protocol/structures/code_action_options.ex index f8304ca..7bc290f 100644 --- a/lib/gen_lsp/protocol/structures/code_action_options.ex +++ b/lib/gen_lsp/protocol/structures/code_action_options.ex @@ -12,12 +12,12 @@ defmodule GenLSP.Structures.CodeActionOptions do ## Fields * code_action_kinds: CodeActionKinds that this server may return. - + The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server may list out every specific kind they provide. * resolve_provider: The server provides support to resolve additional information for a code action. - + @since 3.16.0 * work_done_progress """ diff --git a/lib/gen_lsp/protocol/structures/code_action_registration_options.ex b/lib/gen_lsp/protocol/structures/code_action_registration_options.ex index e91bdcb..165266d 100644 --- a/lib/gen_lsp/protocol/structures/code_action_registration_options.ex +++ b/lib/gen_lsp/protocol/structures/code_action_registration_options.ex @@ -14,12 +14,12 @@ defmodule GenLSP.Structures.CodeActionRegistrationOptions do * document_selector: A document selector to identify the scope of the registration. If set to null the document selector provided on the client side will be used. * code_action_kinds: CodeActionKinds that this server may return. - + The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server may list out every specific kind they provide. * resolve_provider: The server provides support to resolve additional information for a code action. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/code_lens_workspace_client_capabilities.ex b/lib/gen_lsp/protocol/structures/code_lens_workspace_client_capabilities.ex index 4b853f1..dc2fb9a 100644 --- a/lib/gen_lsp/protocol/structures/code_lens_workspace_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/code_lens_workspace_client_capabilities.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.CodeLensWorkspaceClientCapabilities do * refresh_support: Whether the client implementation supports a refresh request sent from the server to the client. - + Note that this event is global and will force the client to refresh all code lenses currently shown. It should be used with absolute care and is useful for situation where a server for example detect a project wide diff --git a/lib/gen_lsp/protocol/structures/completion_client_capabilities.ex b/lib/gen_lsp/protocol/structures/completion_client_capabilities.ex index 9eb87b5..30c19aa 100644 --- a/lib/gen_lsp/protocol/structures/completion_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/completion_client_capabilities.ex @@ -18,13 +18,13 @@ defmodule GenLSP.Structures.CompletionClientCapabilities do * insert_text_mode: Defines how the client handles whitespace and indentation when accepting a completion item that uses multi line text in either `insertText` or `textEdit`. - + @since 3.17.0 * context_support: The client supports to send additional context information for a `textDocument/completion` request. * completion_list: The client supports the following `CompletionList` specific capabilities. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/completion_item.ex b/lib/gen_lsp/protocol/structures/completion_item.ex index 3150710..d0fadc2 100644 --- a/lib/gen_lsp/protocol/structures/completion_item.ex +++ b/lib/gen_lsp/protocol/structures/completion_item.ex @@ -13,19 +13,19 @@ defmodule GenLSP.Structures.CompletionItem do ## Fields * label: The label of this completion item. - + The label property is also by default the text that is inserted when selecting this completion. - + If label details are provided the label itself should be an unqualified name of the completion item. * label_details: Additional details for the label - + @since 3.17.0 * kind: The kind of this completion item. Based of the kind an icon is chosen by the editor. * tags: Tags for this completion item. - + @since 3.15.0 * detail: A human-readable string with additional information about this item, like type or symbol information. @@ -33,7 +33,7 @@ defmodule GenLSP.Structures.CompletionItem do * deprecated: Indicates if this item is deprecated. @deprecated Use `tags` instead. * preselect: Select this item when showing. - + *Note* that only one completion item can be selected and that the tool / client decides which item that is. The rule is that the *first* item of those that match best is selected. @@ -46,7 +46,7 @@ defmodule GenLSP.Structures.CompletionItem do * insert_text: A string that should be inserted into a document when selecting this completion. When `falsy` the {@link CompletionItem.label label} is used. - + The `insertText` is subject to interpretation by the client side. Some tools might not take the string literally. For example VS Code when code complete is requested in this example @@ -57,18 +57,18 @@ defmodule GenLSP.Structures.CompletionItem do * insert_text_format: The format of the insert text. The format applies to both the `insertText` property and the `newText` property of a provided `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. - + Please note that the insertTextFormat doesn't apply to `additionalTextEdits`. * insert_text_mode: How whitespace and indentation is handled during completion item insertion. If not provided the clients default value depends on the `textDocument.completion.insertTextMode` client capability. - + @since 3.16.0 * text_edit: An {@link TextEdit edit} which is applied to a document when selecting this completion. When an edit is provided the value of {@link CompletionItem.insertText insertText} is ignored. - + Most editors support two different operations when accepting a completion item. One is to insert a completion text and the other is to replace an existing text with a completion text. Since this can usually not be @@ -76,29 +76,29 @@ defmodule GenLSP.Structures.CompletionItem do signal support for `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability property. - + *Note 1:* The text edit's range as well as both ranges from an insert replace edit must be a [single line] and they must contain the position at which completion has been requested. *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of the edit's replace range, that means it must be contained and starting at the same position. - + @since 3.16.0 additional type `InsertReplaceEdit` * text_edit_text: The edit text used if the completion item is part of a CompletionList and CompletionList defines an item default for the text edit range. - + Clients will only honor this property if they opt into completion list item defaults using the capability `completionList.itemDefaults`. - + If not provided and a list's default range is provided the label property is used as a text. - + @since 3.17.0 * additional_text_edits: An optional array of additional {@link TextEdit text edits} that are applied when selecting this completion. Edits must not overlap (including the same insert position) with the main {@link CompletionItem.textEdit edit} nor with themselves. - + Additional text edits should be used to change text unrelated to the current cursor position (for example adding an import statement at the top of the file if the completion item will insert an unqualified type). diff --git a/lib/gen_lsp/protocol/structures/completion_list.ex b/lib/gen_lsp/protocol/structures/completion_list.ex index dba3cb8..cf520b2 100644 --- a/lib/gen_lsp/protocol/structures/completion_list.ex +++ b/lib/gen_lsp/protocol/structures/completion_list.ex @@ -13,21 +13,21 @@ defmodule GenLSP.Structures.CompletionList do ## Fields * is_incomplete: This list it not complete. Further typing results in recomputing this list. - + Recomputed lists have all their items replaced (not appended) in the incomplete completion sessions. * item_defaults: In many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value. - + If a completion list specifies a default value and a completion item also specifies a corresponding value the one from the item is used. - + Servers are only allowed to return default values if the client signals support for this via the `completionList.itemDefaults` capability. - + @since 3.17.0 * items: The completion items. """ diff --git a/lib/gen_lsp/protocol/structures/completion_options.ex b/lib/gen_lsp/protocol/structures/completion_options.ex index 2836669..8c8c6b3 100644 --- a/lib/gen_lsp/protocol/structures/completion_options.ex +++ b/lib/gen_lsp/protocol/structures/completion_options.ex @@ -16,22 +16,22 @@ defmodule GenLSP.Structures.CompletionOptions do starts to type an identifier. For example if the user types `c` in a JavaScript file code complete will automatically pop up present `console` besides others as a completion item. Characters that make up identifiers don't need to be listed here. - + If code complete should automatically be trigger on characters not being valid inside an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. * all_commit_characters: The list of all possible characters that commit a completion. This field can be used if clients don't support individual commit characters per completion item. See `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` - + If a server provides both `allCommitCharacters` and commit characters on an individual completion item the ones on the completion item win. - + @since 3.2.0 * resolve_provider: The server provides support to resolve additional information for a completion item. * completion_item: The server supports the following `CompletionItem` specific capabilities. - + @since 3.17.0 * work_done_progress """ diff --git a/lib/gen_lsp/protocol/structures/completion_registration_options.ex b/lib/gen_lsp/protocol/structures/completion_registration_options.ex index 2025242..d122c5f 100644 --- a/lib/gen_lsp/protocol/structures/completion_registration_options.ex +++ b/lib/gen_lsp/protocol/structures/completion_registration_options.ex @@ -18,22 +18,22 @@ defmodule GenLSP.Structures.CompletionRegistrationOptions do starts to type an identifier. For example if the user types `c` in a JavaScript file code complete will automatically pop up present `console` besides others as a completion item. Characters that make up identifiers don't need to be listed here. - + If code complete should automatically be trigger on characters not being valid inside an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. * all_commit_characters: The list of all possible characters that commit a completion. This field can be used if clients don't support individual commit characters per completion item. See `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` - + If a server provides both `allCommitCharacters` and commit characters on an individual completion item the ones on the completion item win. - + @since 3.2.0 * resolve_provider: The server provides support to resolve additional information for a completion item. * completion_item: The server supports the following `CompletionItem` specific capabilities. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/create_file.ex b/lib/gen_lsp/protocol/structures/create_file.ex index 72e756a..714fbd0 100644 --- a/lib/gen_lsp/protocol/structures/create_file.ex +++ b/lib/gen_lsp/protocol/structures/create_file.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.CreateFile do * uri: The resource to create. * options: Additional options * annotation_id: An optional annotation identifier describing the operation. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/definition_client_capabilities.ex b/lib/gen_lsp/protocol/structures/definition_client_capabilities.ex index 707d02e..fc564c9 100644 --- a/lib/gen_lsp/protocol/structures/definition_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/definition_client_capabilities.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.DefinitionClientCapabilities do * dynamic_registration: Whether definition supports dynamic registration. * link_support: The client supports additional metadata in the form of definition links. - + @since 3.14.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/delete_file.ex b/lib/gen_lsp/protocol/structures/delete_file.ex index 05b0d77..f12a244 100644 --- a/lib/gen_lsp/protocol/structures/delete_file.ex +++ b/lib/gen_lsp/protocol/structures/delete_file.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.DeleteFile do * uri: The file to delete. * options: Delete options. * annotation_id: An optional annotation identifier describing the operation. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/diagnostic.ex b/lib/gen_lsp/protocol/structures/diagnostic.ex index f462f5b..5bb24f0 100644 --- a/lib/gen_lsp/protocol/structures/diagnostic.ex +++ b/lib/gen_lsp/protocol/structures/diagnostic.ex @@ -18,20 +18,20 @@ defmodule GenLSP.Structures.Diagnostic do * code: The diagnostic's code, which usually appear in the user interface. * code_description: An optional property to describe the error code. Requires the code field (above) to be present/not null. - + @since 3.16.0 * source: A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface. * message: The diagnostic's message. It usually appears in the user interface * tags: Additional metadata about the diagnostic. - + @since 3.15.0 * related_information: An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property. * data: A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/diagnostic_workspace_client_capabilities.ex b/lib/gen_lsp/protocol/structures/diagnostic_workspace_client_capabilities.ex index 411e761..b26433c 100644 --- a/lib/gen_lsp/protocol/structures/diagnostic_workspace_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/diagnostic_workspace_client_capabilities.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.DiagnosticWorkspaceClientCapabilities do * refresh_support: Whether the client implementation supports a refresh request sent from the server to the client. - + Note that this event is global and will force the client to refresh all pulled diagnostics currently shown. It should be used with absolute care and is useful for situation where a server for example detects a project wide diff --git a/lib/gen_lsp/protocol/structures/did_change_notebook_document_params.ex b/lib/gen_lsp/protocol/structures/did_change_notebook_document_params.ex index de92e50..eda3a43 100644 --- a/lib/gen_lsp/protocol/structures/did_change_notebook_document_params.ex +++ b/lib/gen_lsp/protocol/structures/did_change_notebook_document_params.ex @@ -18,13 +18,13 @@ defmodule GenLSP.Structures.DidChangeNotebookDocumentParams do only the text document content of a cell changes the notebook version doesn't necessarily have to change. * change: The actual changes to the notebook document. - + The changes describe single state changes to the notebook document. So if there are two changes c1 (at array index 0) and c2 (at array index 1) for a notebook in state S then c1 moves the notebook from S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed on the state S'. - + To mirror the content of a notebook using change events use the following approach: - start with the same initial content - apply the 'notebookDocument/didChange' notifications in the order you receive them. diff --git a/lib/gen_lsp/protocol/structures/did_change_text_document_params.ex b/lib/gen_lsp/protocol/structures/did_change_text_document_params.ex index 424f073..cef6059 100644 --- a/lib/gen_lsp/protocol/structures/did_change_text_document_params.ex +++ b/lib/gen_lsp/protocol/structures/did_change_text_document_params.ex @@ -19,7 +19,7 @@ defmodule GenLSP.Structures.DidChangeTextDocumentParams do c2 (at array index 1) for a document in state S then c1 moves the document from S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed on the state S'. - + To mirror the content of a document using change events use the following approach: - start with the same initial content - apply the 'textDocument/didChange' notifications in the order you receive them. diff --git a/lib/gen_lsp/protocol/structures/did_change_watched_files_client_capabilities.ex b/lib/gen_lsp/protocol/structures/did_change_watched_files_client_capabilities.ex index 85691aa..947acc3 100644 --- a/lib/gen_lsp/protocol/structures/did_change_watched_files_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/did_change_watched_files_client_capabilities.ex @@ -12,7 +12,7 @@ defmodule GenLSP.Structures.DidChangeWatchedFilesClientCapabilities do from the server side. * relative_pattern_support: Whether the client has support for {@link RelativePattern relative pattern} or not. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/document_link.ex b/lib/gen_lsp/protocol/structures/document_link.ex index 86ddcd4..94cfc7d 100644 --- a/lib/gen_lsp/protocol/structures/document_link.ex +++ b/lib/gen_lsp/protocol/structures/document_link.ex @@ -15,11 +15,11 @@ defmodule GenLSP.Structures.DocumentLink do * range: The range this link applies to. * target: The uri this link points to. If missing a resolve request is sent later. * tooltip: The tooltip text when you hover over this link. - + If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, user settings, and localization. - + @since 3.15.0 * data: A data entry field that is preserved on a document link between a DocumentLinkRequest and a DocumentLinkResolveRequest. diff --git a/lib/gen_lsp/protocol/structures/document_link_client_capabilities.ex b/lib/gen_lsp/protocol/structures/document_link_client_capabilities.ex index 55e0049..1960f8f 100644 --- a/lib/gen_lsp/protocol/structures/document_link_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/document_link_client_capabilities.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.DocumentLinkClientCapabilities do * dynamic_registration: Whether document link supports dynamic registration. * tooltip_support: Whether the client supports the `tooltip` property on `DocumentLink`. - + @since 3.15.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/document_symbol.ex b/lib/gen_lsp/protocol/structures/document_symbol.ex index ca08adf..818ad91 100644 --- a/lib/gen_lsp/protocol/structures/document_symbol.ex +++ b/lib/gen_lsp/protocol/structures/document_symbol.ex @@ -19,10 +19,10 @@ defmodule GenLSP.Structures.DocumentSymbol do * detail: More detail for this symbol, e.g the signature of a function. * kind: The kind of this symbol. * tags: Tags for this document symbol. - + @since 3.16.0 * deprecated: Indicates if this symbol is deprecated. - + @deprecated Use tags instead * range: The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the clients cursor is diff --git a/lib/gen_lsp/protocol/structures/document_symbol_client_capabilities.ex b/lib/gen_lsp/protocol/structures/document_symbol_client_capabilities.ex index a28a700..0fdd301 100644 --- a/lib/gen_lsp/protocol/structures/document_symbol_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/document_symbol_client_capabilities.ex @@ -18,11 +18,11 @@ defmodule GenLSP.Structures.DocumentSymbolClientCapabilities do * tag_support: The client supports tags on `SymbolInformation`. Tags are supported on `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. Clients supporting tags have to handle unknown tags gracefully. - + @since 3.16.0 * label_support: The client supports an additional label presented in the UI when registering a document symbol provider. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/document_symbol_options.ex b/lib/gen_lsp/protocol/structures/document_symbol_options.ex index e6fa228..f256f26 100644 --- a/lib/gen_lsp/protocol/structures/document_symbol_options.ex +++ b/lib/gen_lsp/protocol/structures/document_symbol_options.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.DocumentSymbolOptions do * label: A human-readable string that is shown when multiple outlines trees are shown for the same document. - + @since 3.16.0 * work_done_progress """ diff --git a/lib/gen_lsp/protocol/structures/document_symbol_registration_options.ex b/lib/gen_lsp/protocol/structures/document_symbol_registration_options.ex index fd401ba..60f6c86 100644 --- a/lib/gen_lsp/protocol/structures/document_symbol_registration_options.ex +++ b/lib/gen_lsp/protocol/structures/document_symbol_registration_options.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.DocumentSymbolRegistrationOptions do the document selector provided on the client side will be used. * label: A human-readable string that is shown when multiple outlines trees are shown for the same document. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/file_operation_pattern.ex b/lib/gen_lsp/protocol/structures/file_operation_pattern.ex index 2db4f67..9e3a042 100644 --- a/lib/gen_lsp/protocol/structures/file_operation_pattern.ex +++ b/lib/gen_lsp/protocol/structures/file_operation_pattern.ex @@ -22,7 +22,7 @@ defmodule GenLSP.Structures.FileOperationPattern do - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`) * matches: Whether to match files or folders with this pattern. - + Matches both if undefined. * options: Additional options used during matching. """ diff --git a/lib/gen_lsp/protocol/structures/file_system_watcher.ex b/lib/gen_lsp/protocol/structures/file_system_watcher.ex index 857c26b..d66c5a8 100644 --- a/lib/gen_lsp/protocol/structures/file_system_watcher.ex +++ b/lib/gen_lsp/protocol/structures/file_system_watcher.ex @@ -8,7 +8,7 @@ defmodule GenLSP.Structures.FileSystemWatcher do ## Fields * glob_pattern: The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail. - + @since 3.17.0 support for relative patterns. * kind: The kind of events of interest. If omitted it defaults to WatchKind.Create | WatchKind.Change | WatchKind.Delete diff --git a/lib/gen_lsp/protocol/structures/folding_range.ex b/lib/gen_lsp/protocol/structures/folding_range.ex index 8687cab..374fd21 100644 --- a/lib/gen_lsp/protocol/structures/folding_range.ex +++ b/lib/gen_lsp/protocol/structures/folding_range.ex @@ -24,7 +24,7 @@ defmodule GenLSP.Structures.FoldingRange do * collapsed_text: The text that the client should show when the specified range is collapsed. If not defined or not supported by the client, a default will be chosen by the client. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/folding_range_client_capabilities.ex b/lib/gen_lsp/protocol/structures/folding_range_client_capabilities.ex index f1485c9..35bab3b 100644 --- a/lib/gen_lsp/protocol/structures/folding_range_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/folding_range_client_capabilities.ex @@ -18,10 +18,10 @@ defmodule GenLSP.Structures.FoldingRangeClientCapabilities do If set, client will ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange. * folding_range_kind: Specific options for the folding range kind. - + @since 3.17.0 * folding_range: Specific options for the folding range. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/formatting_options.ex b/lib/gen_lsp/protocol/structures/formatting_options.ex index d60849d..d93568e 100644 --- a/lib/gen_lsp/protocol/structures/formatting_options.ex +++ b/lib/gen_lsp/protocol/structures/formatting_options.ex @@ -14,13 +14,13 @@ defmodule GenLSP.Structures.FormattingOptions do * tab_size: Size of a tab in spaces. * insert_spaces: Prefer spaces over tabs. * trim_trailing_whitespace: Trim trailing whitespace on a line. - + @since 3.15.0 * insert_final_newline: Insert a newline character at the end of the file if one does not exist. - + @since 3.15.0 * trim_final_newlines: Trim all newlines after the final newline at the end of the file. - + @since 3.15.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/general_client_capabilities.ex b/lib/gen_lsp/protocol/structures/general_client_capabilities.ex index 461c621..2570be8 100644 --- a/lib/gen_lsp/protocol/structures/general_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/general_client_capabilities.ex @@ -17,31 +17,31 @@ defmodule GenLSP.Structures.GeneralClientCapabilities do handles stale requests (e.g. a request for which the client will not process the response anymore since the information is outdated). - + @since 3.17.0 * regular_expressions: Client capabilities specific to regular expressions. - + @since 3.16.0 * markdown: Client capabilities specific to the client's markdown parser. - + @since 3.16.0 * position_encodings: The position encodings supported by the client. Client and server have to agree on the same position encoding to ensure that offsets (e.g. character position in a line) are interpreted the same on both sides. - + To keep the protocol backwards compatible the following applies: if the value 'utf-16' is missing from the array of position encodings servers can assume that the client supports UTF-16. UTF-16 is therefore a mandatory encoding. - + If omitted it defaults to ['utf-16']. - + Implementation considerations: since the conversion from one encoding into another requires the content of the file / line the conversion is best done where the file is read which is usually on the server side. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/implementation_client_capabilities.ex b/lib/gen_lsp/protocol/structures/implementation_client_capabilities.ex index a76f852..373422f 100644 --- a/lib/gen_lsp/protocol/structures/implementation_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/implementation_client_capabilities.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.ImplementationClientCapabilities do the client supports the new `ImplementationRegistrationOptions` return value for the corresponding server capability as well. * link_support: The client supports additional metadata in the form of definition links. - + @since 3.14.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/initialize_params.ex b/lib/gen_lsp/protocol/structures/initialize_params.ex index cf03376..3cb7848 100644 --- a/lib/gen_lsp/protocol/structures/initialize_params.ex +++ b/lib/gen_lsp/protocol/structures/initialize_params.ex @@ -9,38 +9,38 @@ defmodule GenLSP.Structures.InitializeParams do * process_id: The process Id of the parent process that started the server. - + Is `null` if the process has not been started by another process. If the parent process is not alive then the server should exit. * client_info: Information about the client - + @since 3.15.0 * locale: The locale the client is currently showing the user interface in. This must not necessarily be the locale of the operating system. - + Uses IETF language tags as the value's syntax (See https://en.wikipedia.org/wiki/IETF_language_tag) - + @since 3.16.0 * root_path: The rootPath of the workspace. Is null if no folder is open. - + @deprecated in favour of rootUri. * root_uri: The rootUri of the workspace. Is null if no folder is open. If both `rootPath` and `rootUri` are set `rootUri` wins. - + @deprecated in favour of workspaceFolders. * capabilities: The capabilities provided by the client (editor or tool) * initialization_options: User provided initialization options. * trace: The initial trace setting. If omitted trace is disabled ('off'). * workspace_folders: The workspace folders configured in the client when the server starts. - + This property is only available if the client supports workspace folders. It can be `null` if the client supports workspace folders but none are configured. - + @since 3.6.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/initialize_result.ex b/lib/gen_lsp/protocol/structures/initialize_result.ex index 97b322c..b8224cb 100644 --- a/lib/gen_lsp/protocol/structures/initialize_result.ex +++ b/lib/gen_lsp/protocol/structures/initialize_result.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.InitializeResult do * capabilities: The capabilities the language server provides. * server_info: Information about the server. - + @since 3.15.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/inlay_hint.ex b/lib/gen_lsp/protocol/structures/inlay_hint.ex index b673f5f..347281a 100644 --- a/lib/gen_lsp/protocol/structures/inlay_hint.ex +++ b/lib/gen_lsp/protocol/structures/inlay_hint.ex @@ -16,23 +16,23 @@ defmodule GenLSP.Structures.InlayHint do * position: The position of this hint. * label: The label of this hint. A human readable string or an array of InlayHintLabelPart label parts. - + *Note* that neither the string nor the label part can be empty. * kind: The kind of this hint. Can be omitted in which case the client should fall back to a reasonable default. * text_edits: Optional text edits that are performed when accepting this inlay hint. - + *Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is now part of the document and the inlay hint itself is now obsolete. * tooltip: The tooltip text when you hover over this item. * padding_left: Render padding before the hint. - + Note: Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint. * padding_right: Render padding after the hint. - + Note: Padding should use the editor's background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint. diff --git a/lib/gen_lsp/protocol/structures/inlay_hint_label_part.ex b/lib/gen_lsp/protocol/structures/inlay_hint_label_part.ex index 6f4ad26..195aaaf 100644 --- a/lib/gen_lsp/protocol/structures/inlay_hint_label_part.ex +++ b/lib/gen_lsp/protocol/structures/inlay_hint_label_part.ex @@ -20,17 +20,17 @@ defmodule GenLSP.Structures.InlayHintLabelPart do this property late using the resolve request. * location: An optional source code location that represents this label part. - + The editor will use this location for the hover and for code navigation features: This part will become a clickable link that resolves to the definition of the symbol at the given location (not necessarily the location itself), it shows the hover that shows at the given location, and it shows a context menu with further code navigation commands. - + Depending on the client capability `inlayHint.resolveSupport` clients might resolve this property late using the resolve request. * command: An optional command for this label part. - + Depending on the client capability `inlayHint.resolveSupport` clients might resolve this property late using the resolve request. """ diff --git a/lib/gen_lsp/protocol/structures/inlay_hint_workspace_client_capabilities.ex b/lib/gen_lsp/protocol/structures/inlay_hint_workspace_client_capabilities.ex index 626c72d..db49158 100644 --- a/lib/gen_lsp/protocol/structures/inlay_hint_workspace_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/inlay_hint_workspace_client_capabilities.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.InlayHintWorkspaceClientCapabilities do * refresh_support: Whether the client implementation supports a refresh request sent from the server to the client. - + Note that this event is global and will force the client to refresh all inlay hints currently shown. It should be used with absolute care and is useful for situation where a server for example detects a project wide diff --git a/lib/gen_lsp/protocol/structures/inline_value_workspace_client_capabilities.ex b/lib/gen_lsp/protocol/structures/inline_value_workspace_client_capabilities.ex index b6eb23d..ede5f0b 100644 --- a/lib/gen_lsp/protocol/structures/inline_value_workspace_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/inline_value_workspace_client_capabilities.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.InlineValueWorkspaceClientCapabilities do * refresh_support: Whether the client implementation supports a refresh request sent from the server to the client. - + Note that this event is global and will force the client to refresh all inline values currently shown. It should be used with absolute care and is useful for situation where a server for example detects a project wide diff --git a/lib/gen_lsp/protocol/structures/location_link.ex b/lib/gen_lsp/protocol/structures/location_link.ex index a0a7bbb..c9cbacf 100644 --- a/lib/gen_lsp/protocol/structures/location_link.ex +++ b/lib/gen_lsp/protocol/structures/location_link.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.LocationLink do ## Fields * origin_selection_range: Span of the origin of this link. - + Used as the underlined span for mouse interaction. Defaults to the word range at the definition position. * target_uri: The target resource identifier of this link. diff --git a/lib/gen_lsp/protocol/structures/markdown_client_capabilities.ex b/lib/gen_lsp/protocol/structures/markdown_client_capabilities.ex index a1ef905..2340efb 100644 --- a/lib/gen_lsp/protocol/structures/markdown_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/markdown_client_capabilities.ex @@ -17,7 +17,7 @@ defmodule GenLSP.Structures.MarkdownClientCapabilities do * version: The version of the parser. * allowed_tags: A list of HTML tags that the client allows / supports in Markdown. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/notebook_cell.ex b/lib/gen_lsp/protocol/structures/notebook_cell.ex index 8c6cb3c..505b510 100644 --- a/lib/gen_lsp/protocol/structures/notebook_cell.ex +++ b/lib/gen_lsp/protocol/structures/notebook_cell.ex @@ -21,7 +21,7 @@ defmodule GenLSP.Structures.NotebookCell do * document: The URI of the cell's text document content. * metadata: Additional metadata stored with the cell. - + Note: should always be an object literal (e.g. LSPObject) * execution_summary: Additional execution summary information if supported by the client. diff --git a/lib/gen_lsp/protocol/structures/notebook_cell_text_document_filter.ex b/lib/gen_lsp/protocol/structures/notebook_cell_text_document_filter.ex index 8c0f4e8..df7087d 100644 --- a/lib/gen_lsp/protocol/structures/notebook_cell_text_document_filter.ex +++ b/lib/gen_lsp/protocol/structures/notebook_cell_text_document_filter.ex @@ -19,7 +19,7 @@ defmodule GenLSP.Structures.NotebookCellTextDocumentFilter do value is provided it matches against the notebook type. '*' matches every notebook. * language: A language id like `python`. - + Will be matched against the language id of the notebook cell document. '*' matches every language. """ diff --git a/lib/gen_lsp/protocol/structures/notebook_document.ex b/lib/gen_lsp/protocol/structures/notebook_document.ex index 62496cd..85094fb 100644 --- a/lib/gen_lsp/protocol/structures/notebook_document.ex +++ b/lib/gen_lsp/protocol/structures/notebook_document.ex @@ -19,7 +19,7 @@ defmodule GenLSP.Structures.NotebookDocument do change, including undo/redo). * metadata: Additional metadata stored with the notebook document. - + Note: should always be an object literal (e.g. LSPObject) * cells: The cells of a notebook. """ diff --git a/lib/gen_lsp/protocol/structures/notebook_document_change_event.ex b/lib/gen_lsp/protocol/structures/notebook_document_change_event.ex index 8936bc7..f576c14 100644 --- a/lib/gen_lsp/protocol/structures/notebook_document_change_event.ex +++ b/lib/gen_lsp/protocol/structures/notebook_document_change_event.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Structures.NotebookDocumentChangeEvent do ## Fields * metadata: The changed meta data if any. - + Note: should always be an object literal (e.g. LSPObject) * cells: Changes to cells """ diff --git a/lib/gen_lsp/protocol/structures/notebook_document_client_capabilities.ex b/lib/gen_lsp/protocol/structures/notebook_document_client_capabilities.ex index 7293dd5..80c49d9 100644 --- a/lib/gen_lsp/protocol/structures/notebook_document_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/notebook_document_client_capabilities.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Structures.NotebookDocumentClientCapabilities do ## Fields * synchronization: Capabilities specific to notebook document synchronization - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/parameter_information.ex b/lib/gen_lsp/protocol/structures/parameter_information.ex index ed7ea36..1c2c8ae 100644 --- a/lib/gen_lsp/protocol/structures/parameter_information.ex +++ b/lib/gen_lsp/protocol/structures/parameter_information.ex @@ -13,11 +13,11 @@ defmodule GenLSP.Structures.ParameterInformation do ## Fields * label: The label of this parameter information. - + Either a string or an inclusive start and exclusive end offsets within its containing signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 string representation as `Position` and `Range` does. - + *Note*: a label of type string should be a substring of its containing signature label. Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`. * documentation: The human-readable doc-comment of this parameter. Will be shown diff --git a/lib/gen_lsp/protocol/structures/position.ex b/lib/gen_lsp/protocol/structures/position.ex index 9df5968..294f321 100644 --- a/lib/gen_lsp/protocol/structures/position.ex +++ b/lib/gen_lsp/protocol/structures/position.ex @@ -38,14 +38,14 @@ defmodule GenLSP.Structures.Position do ## Fields * line: Line position in a document (zero-based). - + If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. If a line number is negative, it defaults to 0. * character: Character offset on a line in a document (zero-based). - + The meaning of this offset is determined by the negotiated `PositionEncodingKind`. - + If the character value is greater than the line length it defaults back to the line length. """ diff --git a/lib/gen_lsp/protocol/structures/private_initialize_params.ex b/lib/gen_lsp/protocol/structures/private_initialize_params.ex index 72963fc..c1ae26b 100644 --- a/lib/gen_lsp/protocol/structures/private_initialize_params.ex +++ b/lib/gen_lsp/protocol/structures/private_initialize_params.ex @@ -13,28 +13,28 @@ defmodule GenLSP.Structures.PrivateInitializeParams do * process_id: The process Id of the parent process that started the server. - + Is `null` if the process has not been started by another process. If the parent process is not alive then the server should exit. * client_info: Information about the client - + @since 3.15.0 * locale: The locale the client is currently showing the user interface in. This must not necessarily be the locale of the operating system. - + Uses IETF language tags as the value's syntax (See https://en.wikipedia.org/wiki/IETF_language_tag) - + @since 3.16.0 * root_path: The rootPath of the workspace. Is null if no folder is open. - + @deprecated in favour of rootUri. * root_uri: The rootUri of the workspace. Is null if no folder is open. If both `rootPath` and `rootUri` are set `rootUri` wins. - + @deprecated in favour of workspaceFolders. * capabilities: The capabilities provided by the client (editor or tool) * initialization_options: User provided initialization options. diff --git a/lib/gen_lsp/protocol/structures/publish_diagnostics_client_capabilities.ex b/lib/gen_lsp/protocol/structures/publish_diagnostics_client_capabilities.ex index edb82ba..62a8fc7 100644 --- a/lib/gen_lsp/protocol/structures/publish_diagnostics_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/publish_diagnostics_client_capabilities.ex @@ -14,19 +14,19 @@ defmodule GenLSP.Structures.PublishDiagnosticsClientCapabilities do * related_information: Whether the clients accepts diagnostics with related information. * tag_support: Client supports the tag property to provide meta data about a diagnostic. Clients supporting tags have to handle unknown tags gracefully. - + @since 3.15.0 * version_support: Whether the client interprets the version property of the `textDocument/publishDiagnostics` notification's parameter. - + @since 3.15.0 * code_description_support: Client supports a codeDescription property - + @since 3.16.0 * data_support: Whether code action supports the `data` property which is preserved between a `textDocument/publishDiagnostics` and `textDocument/codeAction` request. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/publish_diagnostics_params.ex b/lib/gen_lsp/protocol/structures/publish_diagnostics_params.ex index 69b401c..80b4374 100644 --- a/lib/gen_lsp/protocol/structures/publish_diagnostics_params.ex +++ b/lib/gen_lsp/protocol/structures/publish_diagnostics_params.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.PublishDiagnosticsParams do * uri: The URI for which diagnostic information is reported. * version: Optional the version number of the document the diagnostics are published for. - + @since 3.15.0 * diagnostics: An array of diagnostic information items. """ diff --git a/lib/gen_lsp/protocol/structures/related_full_document_diagnostic_report.ex b/lib/gen_lsp/protocol/structures/related_full_document_diagnostic_report.ex index de2b2f6..36c9af4 100644 --- a/lib/gen_lsp/protocol/structures/related_full_document_diagnostic_report.ex +++ b/lib/gen_lsp/protocol/structures/related_full_document_diagnostic_report.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Structures.RelatedFullDocumentDiagnosticReport do diagnostics in a file B which A depends on. An example of such a language is C/C++ where marco definitions in a file a.cpp and result in errors in a header file b.hpp. - + @since 3.17.0 * kind: A full document diagnostic report. * result_id: An optional result id. If provided it will diff --git a/lib/gen_lsp/protocol/structures/related_unchanged_document_diagnostic_report.ex b/lib/gen_lsp/protocol/structures/related_unchanged_document_diagnostic_report.ex index fcfed5a..feba271 100644 --- a/lib/gen_lsp/protocol/structures/related_unchanged_document_diagnostic_report.ex +++ b/lib/gen_lsp/protocol/structures/related_unchanged_document_diagnostic_report.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Structures.RelatedUnchangedDocumentDiagnosticReport do diagnostics in a file B which A depends on. An example of such a language is C/C++ where marco definitions in a file a.cpp and result in errors in a header file b.hpp. - + @since 3.17.0 * kind: A document diagnostic report indicating no changes to the last result. A server can diff --git a/lib/gen_lsp/protocol/structures/rename_client_capabilities.ex b/lib/gen_lsp/protocol/structures/rename_client_capabilities.ex index 061d17d..b63992e 100644 --- a/lib/gen_lsp/protocol/structures/rename_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/rename_client_capabilities.ex @@ -10,20 +10,20 @@ defmodule GenLSP.Structures.RenameClientCapabilities do * dynamic_registration: Whether rename supports dynamic registration. * prepare_support: Client supports testing for validity of rename operations before execution. - + @since 3.12.0 * prepare_support_default_behavior: Client supports the default behavior result. - + The value indicates the default behavior used by the client. - + @since 3.16.0 * honors_change_annotations: Whether the client honors the change annotations in text edits and resource operations returned via the rename request's workspace edit by for example presenting the workspace edit in the user interface and asking for confirmation. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/rename_file.ex b/lib/gen_lsp/protocol/structures/rename_file.ex index 808f3fd..510f023 100644 --- a/lib/gen_lsp/protocol/structures/rename_file.ex +++ b/lib/gen_lsp/protocol/structures/rename_file.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Structures.RenameFile do * new_uri: The new location. * options: Rename options. * annotation_id: An optional annotation identifier describing the operation. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/rename_options.ex b/lib/gen_lsp/protocol/structures/rename_options.ex index 8a12070..d150f34 100644 --- a/lib/gen_lsp/protocol/structures/rename_options.ex +++ b/lib/gen_lsp/protocol/structures/rename_options.ex @@ -12,7 +12,7 @@ defmodule GenLSP.Structures.RenameOptions do ## Fields * prepare_provider: Renames should be checked and tested before being executed. - + @since version 3.12.0 * work_done_progress """ diff --git a/lib/gen_lsp/protocol/structures/rename_registration_options.ex b/lib/gen_lsp/protocol/structures/rename_registration_options.ex index 138f77b..454fcc4 100644 --- a/lib/gen_lsp/protocol/structures/rename_registration_options.ex +++ b/lib/gen_lsp/protocol/structures/rename_registration_options.ex @@ -14,7 +14,7 @@ defmodule GenLSP.Structures.RenameRegistrationOptions do * document_selector: A document selector to identify the scope of the registration. If set to null the document selector provided on the client side will be used. * prepare_provider: Renames should be checked and tested before being executed. - + @since version 3.12.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/resource_operation.ex b/lib/gen_lsp/protocol/structures/resource_operation.ex index ee4e1de..39f652b 100644 --- a/lib/gen_lsp/protocol/structures/resource_operation.ex +++ b/lib/gen_lsp/protocol/structures/resource_operation.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.ResourceOperation do * kind: The resource operation kind. * annotation_id: An optional annotation identifier describing the operation. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/semantic_tokens_client_capabilities.ex b/lib/gen_lsp/protocol/structures/semantic_tokens_client_capabilities.ex index fbb40c3..600e777 100644 --- a/lib/gen_lsp/protocol/structures/semantic_tokens_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/semantic_tokens_client_capabilities.ex @@ -31,17 +31,17 @@ defmodule GenLSP.Structures.SemanticTokensClientCapabilities do semantic token request, e.g. supports returning LSPErrorCodes.ServerCancelled. If a server does the client needs to retrigger the request. - + @since 3.17.0 * augments_syntax_tokens: Whether the client uses semantic tokens to augment existing syntax tokens. If set to `true` client side created syntax tokens and semantic tokens are both used for colorization. If set to `false` the client only uses the returned semantic tokens for colorization. - + If the value is `undefined` then the client behavior is not specified. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/semantic_tokens_workspace_client_capabilities.ex b/lib/gen_lsp/protocol/structures/semantic_tokens_workspace_client_capabilities.ex index 8453142..3636dd2 100644 --- a/lib/gen_lsp/protocol/structures/semantic_tokens_workspace_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/semantic_tokens_workspace_client_capabilities.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.SemanticTokensWorkspaceClientCapabilities do * refresh_support: Whether the client implementation supports a refresh request sent from the server to the client. - + Note that this event is global and will force the client to refresh all semantic tokens currently shown. It should be used with absolute care and is useful for situation where a server for example detects a project diff --git a/lib/gen_lsp/protocol/structures/server_capabilities.ex b/lib/gen_lsp/protocol/structures/server_capabilities.ex index 0e68ed6..f36c0af 100644 --- a/lib/gen_lsp/protocol/structures/server_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/server_capabilities.ex @@ -14,18 +14,18 @@ defmodule GenLSP.Structures.ServerCapabilities do * position_encoding: 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'. - + @since 3.17.0 * text_document_sync: Defines how text documents are synced. Is either a detailed structure defining each notification or for backwards compatibility the TextDocumentSyncKind number. * notebook_document_sync: Defines how notebook documents are synced. - + @since 3.17.0 * completion_provider: The server provides completion support. * hover_provider: The server provides hover support. @@ -54,28 +54,28 @@ defmodule GenLSP.Structures.ServerCapabilities do * selection_range_provider: The server provides selection range support. * execute_command_provider: The server provides execute command support. * call_hierarchy_provider: The server provides call hierarchy support. - + @since 3.16.0 * linked_editing_range_provider: The server provides linked editing range support. - + @since 3.16.0 * semantic_tokens_provider: The server provides semantic tokens support. - + @since 3.16.0 * moniker_provider: The server provides moniker support. - + @since 3.16.0 * type_hierarchy_provider: The server provides type hierarchy support. - + @since 3.17.0 * inline_value_provider: The server provides inline values. - + @since 3.17.0 * inlay_hint_provider: The server provides inlay hints. - + @since 3.17.0 * diagnostic_provider: The server has support for pull model diagnostics. - + @since 3.17.0 * workspace: Workspace specific server capabilities. * experimental: Experimental server capabilities. diff --git a/lib/gen_lsp/protocol/structures/signature_help.ex b/lib/gen_lsp/protocol/structures/signature_help.ex index da27153..4a54234 100644 --- a/lib/gen_lsp/protocol/structures/signature_help.ex +++ b/lib/gen_lsp/protocol/structures/signature_help.ex @@ -17,10 +17,10 @@ defmodule GenLSP.Structures.SignatureHelp do * active_signature: The active signature. If omitted or the value lies outside the range of `signatures` the value defaults to zero or is ignored if the `SignatureHelp` has no signatures. - + Whenever possible implementors should make an active decision about the active signature and shouldn't rely on a default value. - + In future version of the protocol this property might become mandatory to better express this. * active_parameter: The active parameter of the active signature. If omitted or the value diff --git a/lib/gen_lsp/protocol/structures/signature_help_client_capabilities.ex b/lib/gen_lsp/protocol/structures/signature_help_client_capabilities.ex index fd4fe17..7651552 100644 --- a/lib/gen_lsp/protocol/structures/signature_help_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/signature_help_client_capabilities.ex @@ -18,7 +18,7 @@ defmodule GenLSP.Structures.SignatureHelpClientCapabilities do `textDocument/signatureHelp` request. A client that opts into contextSupport will also support the `retriggerCharacters` on `SignatureHelpOptions`. - + @since 3.15.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/signature_help_context.ex b/lib/gen_lsp/protocol/structures/signature_help_context.ex index 5596742..d068fef 100644 --- a/lib/gen_lsp/protocol/structures/signature_help_context.ex +++ b/lib/gen_lsp/protocol/structures/signature_help_context.ex @@ -15,14 +15,14 @@ defmodule GenLSP.Structures.SignatureHelpContext do * trigger_kind: Action that caused signature help to be triggered. * trigger_character: Character that caused signature help to be triggered. - + This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter` * is_retrigger: `true` if signature help was already showing when it was triggered. - + Retriggers occurs when the signature help is already active and can be caused by actions such as typing a trigger character, a cursor move, or document content changes. * active_signature_help: The currently active `SignatureHelp`. - + The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on the user navigating through available signatures. """ diff --git a/lib/gen_lsp/protocol/structures/signature_help_options.ex b/lib/gen_lsp/protocol/structures/signature_help_options.ex index 8f1b7ba..5bd1e11 100644 --- a/lib/gen_lsp/protocol/structures/signature_help_options.ex +++ b/lib/gen_lsp/protocol/structures/signature_help_options.ex @@ -13,10 +13,10 @@ defmodule GenLSP.Structures.SignatureHelpOptions do * trigger_characters: List of characters that trigger signature help automatically. * retrigger_characters: List of characters that re-trigger signature help. - + These trigger characters are only active when signature help is already showing. All trigger characters are also counted as re-trigger characters. - + @since 3.15.0 * work_done_progress """ diff --git a/lib/gen_lsp/protocol/structures/signature_help_params.ex b/lib/gen_lsp/protocol/structures/signature_help_params.ex index 2bf59d0..e90a7d7 100644 --- a/lib/gen_lsp/protocol/structures/signature_help_params.ex +++ b/lib/gen_lsp/protocol/structures/signature_help_params.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.SignatureHelpParams do * context: The signature help context. This is only available if the client specifies to send this using the client capability `textDocument.signatureHelp.contextSupport === true` - + @since 3.15.0 * work_done_token: An optional token that a server can use to report work done progress. * text_document: The text document. diff --git a/lib/gen_lsp/protocol/structures/signature_help_registration_options.ex b/lib/gen_lsp/protocol/structures/signature_help_registration_options.ex index 4a1084e..ae17dfe 100644 --- a/lib/gen_lsp/protocol/structures/signature_help_registration_options.ex +++ b/lib/gen_lsp/protocol/structures/signature_help_registration_options.ex @@ -15,10 +15,10 @@ defmodule GenLSP.Structures.SignatureHelpRegistrationOptions do the document selector provided on the client side will be used. * trigger_characters: List of characters that trigger signature help automatically. * retrigger_characters: List of characters that re-trigger signature help. - + These trigger characters are only active when signature help is already showing. All trigger characters are also counted as re-trigger characters. - + @since 3.15.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/signature_information.ex b/lib/gen_lsp/protocol/structures/signature_information.ex index 7d2be06..132061c 100644 --- a/lib/gen_lsp/protocol/structures/signature_information.ex +++ b/lib/gen_lsp/protocol/structures/signature_information.ex @@ -19,9 +19,9 @@ defmodule GenLSP.Structures.SignatureInformation do in the UI but can be omitted. * parameters: The parameters of this signature. * active_parameter: The index of the active parameter. - + If provided, this is used in place of `SignatureHelp.activeParameter`. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/symbol_information.ex b/lib/gen_lsp/protocol/structures/symbol_information.ex index 6967e42..7936178 100644 --- a/lib/gen_lsp/protocol/structures/symbol_information.ex +++ b/lib/gen_lsp/protocol/structures/symbol_information.ex @@ -13,21 +13,21 @@ defmodule GenLSP.Structures.SymbolInformation do ## Fields * deprecated: Indicates if this symbol is deprecated. - + @deprecated Use tags instead * location: The location of this symbol. The location's range is used by a tool to reveal the location in the editor. If the symbol is selected in the tool the range's start information is used to position the cursor. So the range usually spans more than the actual symbol's name and does normally include things like visibility modifiers. - + The range doesn't have to denote a node range in the sense of an abstract syntax tree. It can therefore not be used to re-construct a hierarchy of the symbols. * name: The name of this symbol. * kind: The kind of this symbol. * tags: Tags for this symbol. - + @since 3.16.0 * container_name: The name of the symbol containing this symbol. This information is for user interface purposes (e.g. to render a qualifier in the user interface diff --git a/lib/gen_lsp/protocol/structures/text_document_client_capabilities.ex b/lib/gen_lsp/protocol/structures/text_document_client_capabilities.ex index d44a896..cf3e36f 100644 --- a/lib/gen_lsp/protocol/structures/text_document_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/text_document_client_capabilities.ex @@ -16,14 +16,14 @@ defmodule GenLSP.Structures.TextDocumentClientCapabilities do * hover: Capabilities specific to the `textDocument/hover` request. * signature_help: Capabilities specific to the `textDocument/signatureHelp` request. * declaration: Capabilities specific to the `textDocument/declaration` request. - + @since 3.14.0 * definition: Capabilities specific to the `textDocument/definition` request. * type_definition: Capabilities specific to the `textDocument/typeDefinition` request. - + @since 3.6.0 * implementation: Capabilities specific to the `textDocument/implementation` request. - + @since 3.6.0 * references: Capabilities specific to the `textDocument/references` request. * document_highlight: Capabilities specific to the `textDocument/documentHighlight` request. @@ -33,42 +33,42 @@ defmodule GenLSP.Structures.TextDocumentClientCapabilities do * document_link: Capabilities specific to the `textDocument/documentLink` request. * color_provider: Capabilities specific to the `textDocument/documentColor` and the `textDocument/colorPresentation` request. - + @since 3.6.0 * formatting: Capabilities specific to the `textDocument/formatting` request. * range_formatting: Capabilities specific to the `textDocument/rangeFormatting` request. * on_type_formatting: Capabilities specific to the `textDocument/onTypeFormatting` request. * rename: Capabilities specific to the `textDocument/rename` request. * folding_range: Capabilities specific to the `textDocument/foldingRange` request. - + @since 3.10.0 * selection_range: Capabilities specific to the `textDocument/selectionRange` request. - + @since 3.15.0 * publish_diagnostics: Capabilities specific to the `textDocument/publishDiagnostics` notification. * call_hierarchy: Capabilities specific to the various call hierarchy requests. - + @since 3.16.0 * semantic_tokens: Capabilities specific to the various semantic token request. - + @since 3.16.0 * linked_editing_range: Capabilities specific to the `textDocument/linkedEditingRange` request. - + @since 3.16.0 * moniker: Client capabilities specific to the `textDocument/moniker` request. - + @since 3.16.0 * type_hierarchy: Capabilities specific to the various type hierarchy requests. - + @since 3.17.0 * inline_value: Capabilities specific to the `textDocument/inlineValue` request. - + @since 3.17.0 * inlay_hint: Capabilities specific to the `textDocument/inlayHint` request. - + @since 3.17.0 * diagnostic: Capabilities specific to the diagnostic pull model. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/text_document_edit.ex b/lib/gen_lsp/protocol/structures/text_document_edit.ex index ec16197..8838d5f 100644 --- a/lib/gen_lsp/protocol/structures/text_document_edit.ex +++ b/lib/gen_lsp/protocol/structures/text_document_edit.ex @@ -16,7 +16,7 @@ defmodule GenLSP.Structures.TextDocumentEdit do * text_document: The text document to change. * edits: The edits to be applied. - + @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a client capability. """ diff --git a/lib/gen_lsp/protocol/structures/type_definition_client_capabilities.ex b/lib/gen_lsp/protocol/structures/type_definition_client_capabilities.ex index b4d421f..7e035a9 100644 --- a/lib/gen_lsp/protocol/structures/type_definition_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/type_definition_client_capabilities.ex @@ -15,7 +15,7 @@ defmodule GenLSP.Structures.TypeDefinitionClientCapabilities do the client supports the new `TypeDefinitionRegistrationOptions` return value for the corresponding server capability as well. * link_support: The client supports additional metadata in the form of definition links. - + Since 3.14.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/window_client_capabilities.ex b/lib/gen_lsp/protocol/structures/window_client_capabilities.ex index 8355a69..4dc587a 100644 --- a/lib/gen_lsp/protocol/structures/window_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/window_client_capabilities.ex @@ -9,18 +9,18 @@ defmodule GenLSP.Structures.WindowClientCapabilities do * work_done_progress: It indicates whether the client supports server initiated progress using the `window/workDoneProgress/create` request. - + The capability also controls Whether client supports handling of progress notifications. If set servers are allowed to report a `workDoneProgress` property in the request specific server capabilities. - + @since 3.15.0 * show_message: Capabilities specific to the showMessage request. - + @since 3.16.0 * show_document: Capabilities specific to the showDocument request. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/work_done_progress_begin.ex b/lib/gen_lsp/protocol/structures/work_done_progress_begin.ex index b9c7c88..7b20a48 100644 --- a/lib/gen_lsp/protocol/structures/work_done_progress_begin.ex +++ b/lib/gen_lsp/protocol/structures/work_done_progress_begin.ex @@ -10,20 +10,20 @@ defmodule GenLSP.Structures.WorkDoneProgressBegin do * kind * title: Mandatory title of the progress operation. Used to briefly inform about the kind of operation being performed. - + Examples: "Indexing" or "Linking dependencies". * cancellable: Controls if a cancel button should show to allow the user to cancel the long running operation. Clients that don't support cancellation are allowed to ignore the setting. * message: Optional, more detailed associated progress message. Contains complementary information to the `title`. - + Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". If unset, the previous progress message (if any) is still valid. * percentage: Optional progress percentage to display (value 100 is considered 100%). If not provided infinite progress is assumed and clients are allowed to ignore the `percentage` value in subsequent in report notifications. - + The value should be steadily rising. Clients are free to ignore values that are not following this rule. The value range is [0, 100]. """ diff --git a/lib/gen_lsp/protocol/structures/work_done_progress_report.ex b/lib/gen_lsp/protocol/structures/work_done_progress_report.ex index f37de01..4cce57c 100644 --- a/lib/gen_lsp/protocol/structures/work_done_progress_report.ex +++ b/lib/gen_lsp/protocol/structures/work_done_progress_report.ex @@ -9,18 +9,18 @@ defmodule GenLSP.Structures.WorkDoneProgressReport do * kind * cancellable: Controls enablement state of a cancel button. - + Clients that don't support cancellation or don't support controlling the button's enablement state are allowed to ignore the property. * message: Optional, more detailed associated progress message. Contains complementary information to the `title`. - + Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". If unset, the previous progress message (if any) is still valid. * percentage: Optional progress percentage to display (value 100 is considered 100%). If not provided infinite progress is assumed and clients are allowed to ignore the `percentage` value in subsequent in report notifications. - + The value should be steadily rising. Clients are free to ignore values that are not following this rule. The value range is [0, 100] """ diff --git a/lib/gen_lsp/protocol/structures/workspace_client_capabilities.ex b/lib/gen_lsp/protocol/structures/workspace_client_capabilities.ex index b7ce8de..77ce545 100644 --- a/lib/gen_lsp/protocol/structures/workspace_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/workspace_client_capabilities.ex @@ -20,33 +20,33 @@ defmodule GenLSP.Structures.WorkspaceClientCapabilities do * symbol: Capabilities specific to the `workspace/symbol` request. * execute_command: Capabilities specific to the `workspace/executeCommand` request. * workspace_folders: The client has support for workspace folders. - + @since 3.6.0 * configuration: The client supports `workspace/configuration` requests. - + @since 3.6.0 * semantic_tokens: Capabilities specific to the semantic token requests scoped to the workspace. - + @since 3.16.0. * code_lens: Capabilities specific to the code lens requests scoped to the workspace. - + @since 3.16.0. * file_operations: The client has support for file notifications/requests for user operations on files. - + Since 3.16.0 * inline_value: Capabilities specific to the inline values requests scoped to the workspace. - + @since 3.17.0. * inlay_hint: Capabilities specific to the inlay hint requests scoped to the workspace. - + @since 3.17.0. * diagnostics: Capabilities specific to the diagnostic requests scoped to the workspace. - + @since 3.17.0. """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/workspace_edit.ex b/lib/gen_lsp/protocol/structures/workspace_edit.ex index cec935e..4e88ca5 100644 --- a/lib/gen_lsp/protocol/structures/workspace_edit.ex +++ b/lib/gen_lsp/protocol/structures/workspace_edit.ex @@ -27,17 +27,17 @@ defmodule GenLSP.Structures.WorkspaceEdit do are either an array of `TextDocumentEdit`s to express changes to n different text documents where each text document edit addresses a specific version of a text document. Or it can contain above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. - + Whether a client supports versioned document edits is expressed via `workspace.workspaceEdit.documentChanges` client capability. - + If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s using the `changes` property are supported. * change_annotations: A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and delete file / folder operations. - + Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/workspace_edit_client_capabilities.ex b/lib/gen_lsp/protocol/structures/workspace_edit_client_capabilities.ex index b608981..d6ba6d2 100644 --- a/lib/gen_lsp/protocol/structures/workspace_edit_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/workspace_edit_client_capabilities.ex @@ -10,22 +10,22 @@ defmodule GenLSP.Structures.WorkspaceEditClientCapabilities do * document_changes: The client supports versioned document changes in `WorkspaceEdit`s * resource_operations: The resource operations the client supports. Clients should at least support 'create', 'rename' and 'delete' files and folders. - + @since 3.13.0 * failure_handling: The failure handling strategy of a client if applying the workspace edit fails. - + @since 3.13.0 * normalizes_line_endings: Whether the client normalizes line endings to the client specific setting. If set to `true` the client will normalize line ending characters in a workspace edit to the client-specified new line character. - + @since 3.16.0 * change_annotation_support: Whether the client in general supports change annotations on text edits, create file, rename file and delete file changes. - + @since 3.16.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/workspace_folders_initialize_params.ex b/lib/gen_lsp/protocol/structures/workspace_folders_initialize_params.ex index afebada..8f0ec9f 100644 --- a/lib/gen_lsp/protocol/structures/workspace_folders_initialize_params.ex +++ b/lib/gen_lsp/protocol/structures/workspace_folders_initialize_params.ex @@ -8,11 +8,11 @@ defmodule GenLSP.Structures.WorkspaceFoldersInitializeParams do ## Fields * workspace_folders: The workspace folders configured in the client when the server starts. - + This property is only available if the client supports workspace folders. It can be `null` if the client supports workspace folders but none are configured. - + @since 3.6.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/workspace_folders_server_capabilities.ex b/lib/gen_lsp/protocol/structures/workspace_folders_server_capabilities.ex index 3986918..e13177b 100644 --- a/lib/gen_lsp/protocol/structures/workspace_folders_server_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/workspace_folders_server_capabilities.ex @@ -10,7 +10,7 @@ defmodule GenLSP.Structures.WorkspaceFoldersServerCapabilities do * supported: The server has support for workspace folders * change_notifications: Whether the server wants to receive workspace folder change notifications. - + If a string is provided the string is treated as an ID under which the notification is registered on the client side. The ID can be used to unregister for these events diff --git a/lib/gen_lsp/protocol/structures/workspace_symbol.ex b/lib/gen_lsp/protocol/structures/workspace_symbol.ex index a07a739..457f906 100644 --- a/lib/gen_lsp/protocol/structures/workspace_symbol.ex +++ b/lib/gen_lsp/protocol/structures/workspace_symbol.ex @@ -18,14 +18,14 @@ defmodule GenLSP.Structures.WorkspaceSymbol do * location: The location of the symbol. Whether a server is allowed to return a location without a range depends on the client capability `workspace.symbol.resolveSupport`. - + See SymbolInformation#location for more details. * data: A data entry field that is preserved on a workspace symbol between a workspace symbol request and a workspace symbol resolve request. * name: The name of this symbol. * kind: The kind of this symbol. * tags: Tags for this symbol. - + @since 3.16.0 * container_name: The name of the symbol containing this symbol. This information is for user interface purposes (e.g. to render a qualifier in the user interface diff --git a/lib/gen_lsp/protocol/structures/workspace_symbol_client_capabilities.ex b/lib/gen_lsp/protocol/structures/workspace_symbol_client_capabilities.ex index 551875d..be885d4 100644 --- a/lib/gen_lsp/protocol/structures/workspace_symbol_client_capabilities.ex +++ b/lib/gen_lsp/protocol/structures/workspace_symbol_client_capabilities.ex @@ -15,12 +15,12 @@ defmodule GenLSP.Structures.WorkspaceSymbolClientCapabilities do * symbol_kind: Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. * tag_support: The client supports tags on `SymbolInformation`. Clients supporting tags have to handle unknown tags gracefully. - + @since 3.16.0 * resolve_support: The client support partial workspace symbols. The client will send the request `workspaceSymbol/resolve` to the server to resolve additional properties. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/lib/gen_lsp/protocol/structures/workspace_symbol_options.ex b/lib/gen_lsp/protocol/structures/workspace_symbol_options.ex index a11bb72..2101579 100644 --- a/lib/gen_lsp/protocol/structures/workspace_symbol_options.ex +++ b/lib/gen_lsp/protocol/structures/workspace_symbol_options.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.WorkspaceSymbolOptions do * resolve_provider: The server provides support to resolve additional information for a workspace symbol. - + @since 3.17.0 * work_done_progress """ diff --git a/lib/gen_lsp/protocol/structures/workspace_symbol_registration_options.ex b/lib/gen_lsp/protocol/structures/workspace_symbol_registration_options.ex index 444512b..59f59af 100644 --- a/lib/gen_lsp/protocol/structures/workspace_symbol_registration_options.ex +++ b/lib/gen_lsp/protocol/structures/workspace_symbol_registration_options.ex @@ -13,7 +13,7 @@ defmodule GenLSP.Structures.WorkspaceSymbolRegistrationOptions do * resolve_provider: The server provides support to resolve additional information for a workspace symbol. - + @since 3.17.0 """ @derive Jason.Encoder diff --git a/test/gen_lsp_test.exs b/test/gen_lsp_test.exs index 0af3107..13a2e82 100644 --- a/test/gen_lsp_test.exs +++ b/test/gen_lsp_test.exs @@ -41,6 +41,28 @@ defmodule GenLSPTest do 500 end + test "accepts a string id", %{client: client} do + id = System.unique_integer([:positive]) |> to_string() + + assert :ok == + request(client, %{ + "jsonrpc" => "2.0", + "method" => "initialize", + "params" => %{"capabilities" => %{}}, + "id" => id + }) + + assert_result ^id, + %{ + "capabilities" => %{ + "callHierarchyProvider" => %{"workDoneProgress" => true}, + "experimental" => nil + }, + "serverInfo" => %{"name" => "Test LSP"} + }, + 500 + end + # @tag :skip test "cancels a request", %{client: client} do id = System.unique_integer([:positive])