chore: clean up manual From/ToJson instances
This commit is contained in:
parent
d8b13c0fa2
commit
434564b125
1 changed files with 4 additions and 28 deletions
|
|
@ -20,40 +20,16 @@ structure Hover where
|
|||
deriving ToJson, FromJson
|
||||
|
||||
structure HoverParams extends TextDocumentPositionParams
|
||||
|
||||
instance : FromJson HoverParams := ⟨fun j => do
|
||||
let tdpp ← @fromJson? TextDocumentPositionParams _ j
|
||||
pure ⟨tdpp⟩⟩
|
||||
|
||||
instance : ToJson HoverParams :=
|
||||
⟨fun o => toJson o.toTextDocumentPositionParams⟩
|
||||
deriving FromJson, ToJson
|
||||
|
||||
structure DeclarationParams extends TextDocumentPositionParams
|
||||
|
||||
instance : FromJson DeclarationParams := ⟨fun j => do
|
||||
let tdpp ← @fromJson? TextDocumentPositionParams _ j
|
||||
pure ⟨tdpp⟩⟩
|
||||
|
||||
instance : ToJson DeclarationParams :=
|
||||
⟨fun o => toJson o.toTextDocumentPositionParams⟩
|
||||
deriving FromJson, ToJson
|
||||
|
||||
structure DefinitionParams extends TextDocumentPositionParams
|
||||
|
||||
instance : FromJson DefinitionParams := ⟨fun j => do
|
||||
let tdpp ← @fromJson? TextDocumentPositionParams _ j
|
||||
pure ⟨tdpp⟩⟩
|
||||
|
||||
instance : ToJson DefinitionParams :=
|
||||
⟨fun o => toJson o.toTextDocumentPositionParams⟩
|
||||
deriving FromJson, ToJson
|
||||
|
||||
structure TypeDefinitionParams extends TextDocumentPositionParams
|
||||
|
||||
instance : FromJson TypeDefinitionParams := ⟨fun j => do
|
||||
let tdpp ← @fromJson? TextDocumentPositionParams _ j
|
||||
pure ⟨tdpp⟩⟩
|
||||
|
||||
instance : ToJson TypeDefinitionParams :=
|
||||
⟨fun o => toJson o.toTextDocumentPositionParams⟩
|
||||
deriving FromJson, ToJson
|
||||
|
||||
structure DocumentSymbolParams where
|
||||
textDocument : TextDocumentIdentifier
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue