Skip to content

Commit 3258e11

Browse files
committed
fix: include workDoneProgress token
1 parent 88472af commit 3258e11

108 files changed

Lines changed: 339 additions & 249 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/gen_lsp/protocol/structures/base_symbol_information.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule GenLSP.Structures.BaseSymbolInformation do
1414
* name: The name of this symbol.
1515
* kind: The kind of this symbol.
1616
* tags: Tags for this symbol.
17-
17+
1818
@since 3.16.0
1919
* container_name: The name of the symbol containing this symbol. This information is for
2020
user interface purposes (e.g. to render a qualifier in the user interface

lib/gen_lsp/protocol/structures/call_hierarchy_registration_options.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ defmodule GenLSP.Structures.CallHierarchyRegistrationOptions do
1717
the request again. See also Registration#id.
1818
* document_selector: A document selector to identify the scope of the registration. If set to null
1919
the document selector provided on the client side will be used.
20+
* work_done_progress
2021
"""
2122
@derive Jason.Encoder
2223
typedstruct do
2324
field :id, String.t()
2425
field :document_selector, GenLSP.TypeAlias.DocumentSelector.t() | nil, enforce: true
26+
field :work_done_progress, boolean()
2527
end
2628

2729
@doc false
@@ -30,7 +32,8 @@ defmodule GenLSP.Structures.CallHierarchyRegistrationOptions do
3032
schema(__MODULE__, %{
3133
optional({"id", :id}) => str(),
3234
{"documentSelector", :document_selector} =>
33-
oneof([GenLSP.TypeAlias.DocumentSelector.schema(), nil])
35+
oneof([GenLSP.TypeAlias.DocumentSelector.schema(), nil]),
36+
optional({"workDoneProgress", :work_done_progress}) => bool()
3437
})
3538
end
3639
end

lib/gen_lsp/protocol/structures/client_capabilities.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ defmodule GenLSP.Structures.ClientCapabilities do
1414
* workspace: Workspace specific client capabilities.
1515
* text_document: Text document specific client capabilities.
1616
* notebook_document: Capabilities specific to the notebook document support.
17-
17+
1818
@since 3.17.0
1919
* window: Window specific client capabilities.
2020
* general: General client capabilities.
21-
21+
2222
@since 3.16.0
2323
* experimental: Experimental client capabilities.
2424
"""

lib/gen_lsp/protocol/structures/code_action.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ defmodule GenLSP.Structures.CodeAction do
1616
1717
* title: A short, human-readable, title for this code action.
1818
* kind: The kind of the code action.
19-
19+
2020
Used to filter code actions.
2121
* diagnostics: The diagnostics that this code action resolves.
2222
* is_preferred: Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
2323
by keybindings.
24-
24+
2525
A quick fix should be marked preferred if it properly addresses the underlying error.
2626
A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
27-
27+
2828
@since 3.15.0
2929
* disabled: Marks that the code action cannot currently be applied.
30-
30+
3131
Clients should follow the following guidelines regarding disabled code actions:
32-
32+
3333
- Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
3434
code action menus.
35-
35+
3636
- Disabled actions are shown as faded out in the code action menu when the user requests a more specific type
3737
of code action, such as refactorings.
38-
38+
3939
- If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
4040
that auto applies a code action and only disabled code actions are returned, the client should show the user an
4141
error message with `reason` in the editor.
42-
42+
4343
@since 3.16.0
4444
* edit: The workspace edit this code action performs.
4545
* command: A command this code action executes. If a code action
4646
provides an edit and a command, first the edit is
4747
executed and then the command.
4848
* data: A data entry field that is preserved on a code action between
4949
a `textDocument/codeAction` and a `codeAction/resolve` request.
50-
50+
5151
@since 3.16.0
5252
"""
5353
@derive Jason.Encoder

lib/gen_lsp/protocol/structures/code_action_client_capabilities.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@ defmodule GenLSP.Structures.CodeActionClientCapabilities do
1515
* code_action_literal_support: The client support code action literals of type `CodeAction` as a valid
1616
response of the `textDocument/codeAction` request. If the property is not
1717
set the request can only return `Command` literals.
18-
18+
1919
@since 3.8.0
2020
* is_preferred_support: Whether code action supports the `isPreferred` property.
21-
21+
2222
@since 3.15.0
2323
* disabled_support: Whether code action supports the `disabled` property.
24-
24+
2525
@since 3.16.0
2626
* data_support: Whether code action supports the `data` property which is
2727
preserved between a `textDocument/codeAction` and a
2828
`codeAction/resolve` request.
29-
29+
3030
@since 3.16.0
3131
* resolve_support: Whether the client supports resolving additional code action
3232
properties via a separate `codeAction/resolve` request.
33-
33+
3434
@since 3.16.0
3535
* honors_change_annotations: Whether the client honors the change annotations in
3636
text edits and resource operations returned via the
3737
`CodeAction#edit` property by for example presenting
3838
the workspace edit in the user interface and asking
3939
for confirmation.
40-
40+
4141
@since 3.16.0
4242
"""
4343
@derive Jason.Encoder

lib/gen_lsp/protocol/structures/code_action_context.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ defmodule GenLSP.Structures.CodeActionContext do
1818
that these accurately reflect the error state of the resource. The primary parameter
1919
to compute code actions is the provided range.
2020
* only: Requested kind of actions to return.
21-
21+
2222
Actions not of this kind are filtered out by the client before being shown. So servers
2323
can omit computing them.
2424
* trigger_kind: The reason why code actions were requested.
25-
25+
2626
@since 3.17.0
2727
"""
2828
@derive Jason.Encoder

lib/gen_lsp/protocol/structures/code_action_options.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ defmodule GenLSP.Structures.CodeActionOptions do
1212
## Fields
1313
1414
* code_action_kinds: CodeActionKinds that this server may return.
15-
15+
1616
The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
1717
may list out every specific kind they provide.
1818
* resolve_provider: The server provides support to resolve additional
1919
information for a code action.
20-
20+
2121
@since 3.16.0
2222
* work_done_progress
2323
"""

lib/gen_lsp/protocol/structures/code_action_registration_options.ex

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ defmodule GenLSP.Structures.CodeActionRegistrationOptions do
1414
* document_selector: A document selector to identify the scope of the registration. If set to null
1515
the document selector provided on the client side will be used.
1616
* code_action_kinds: CodeActionKinds that this server may return.
17-
17+
1818
The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
1919
may list out every specific kind they provide.
2020
* resolve_provider: The server provides support to resolve additional
2121
information for a code action.
22-
22+
2323
@since 3.16.0
24+
* work_done_progress
2425
"""
2526
@derive Jason.Encoder
2627
typedstruct do
2728
field :document_selector, GenLSP.TypeAlias.DocumentSelector.t() | nil, enforce: true
2829
field :code_action_kinds, list(GenLSP.Enumerations.CodeActionKind.t())
2930
field :resolve_provider, boolean()
31+
field :work_done_progress, boolean()
3032
end
3133

3234
@doc false
@@ -37,7 +39,8 @@ defmodule GenLSP.Structures.CodeActionRegistrationOptions do
3739
oneof([GenLSP.TypeAlias.DocumentSelector.schema(), nil]),
3840
optional({"codeActionKinds", :code_action_kinds}) =>
3941
list(GenLSP.Enumerations.CodeActionKind.schema()),
40-
optional({"resolveProvider", :resolve_provider}) => bool()
42+
optional({"resolveProvider", :resolve_provider}) => bool(),
43+
optional({"workDoneProgress", :work_done_progress}) => bool()
4144
})
4245
end
4346
end

lib/gen_lsp/protocol/structures/code_lens_registration_options.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ defmodule GenLSP.Structures.CodeLensRegistrationOptions do
1414
* document_selector: A document selector to identify the scope of the registration. If set to null
1515
the document selector provided on the client side will be used.
1616
* resolve_provider: Code lens has a resolve provider as well.
17+
* work_done_progress
1718
"""
1819
@derive Jason.Encoder
1920
typedstruct do
2021
field :document_selector, GenLSP.TypeAlias.DocumentSelector.t() | nil, enforce: true
2122
field :resolve_provider, boolean()
23+
field :work_done_progress, boolean()
2224
end
2325

2426
@doc false
@@ -27,7 +29,8 @@ defmodule GenLSP.Structures.CodeLensRegistrationOptions do
2729
schema(__MODULE__, %{
2830
{"documentSelector", :document_selector} =>
2931
oneof([GenLSP.TypeAlias.DocumentSelector.schema(), nil]),
30-
optional({"resolveProvider", :resolve_provider}) => bool()
32+
optional({"resolveProvider", :resolve_provider}) => bool(),
33+
optional({"workDoneProgress", :work_done_progress}) => bool()
3134
})
3235
end
3336
end

lib/gen_lsp/protocol/structures/code_lens_workspace_client_capabilities.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defmodule GenLSP.Structures.CodeLensWorkspaceClientCapabilities do
1313
1414
* refresh_support: Whether the client implementation supports a refresh request sent from the
1515
server to the client.
16-
16+
1717
Note that this event is global and will force the client to refresh all
1818
code lenses currently shown. It should be used with absolute care and is
1919
useful for situation where a server for example detect a project wide

0 commit comments

Comments
 (0)