/
hover_params.ex
34 lines (29 loc) · 1.02 KB
/
hover_params.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# codegen: do not edit
defmodule GenLSP.Structures.HoverParams do
@moduledoc """
Parameters for a {@link HoverRequest}.
"""
import Schematic, warn: false
use TypedStruct
@doc """
## Fields
* work_done_token: An optional token that a server can use to report work done progress.
* text_document: The text document.
* position: The position inside the text document.
"""
@derive Jason.Encoder
typedstruct do
field :work_done_token, GenLSP.TypeAlias.ProgressToken.t()
field :text_document, GenLSP.Structures.TextDocumentIdentifier.t(), enforce: true
field :position, GenLSP.Structures.Position.t(), enforce: true
end
@doc false
@spec schematic() :: Schematic.t()
def schematic() do
schema(__MODULE__, %{
optional({"workDoneToken", :work_done_token}) => GenLSP.TypeAlias.ProgressToken.schematic(),
{"textDocument", :text_document} => GenLSP.Structures.TextDocumentIdentifier.schematic(),
{"position", :position} => GenLSP.Structures.Position.schematic()
})
end
end