Skip to content

Commit 8e2118b

Browse files
committed
capabilities_server: move some struct to capabilities_server
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 52be5ea commit 8e2118b

File tree

6 files changed

+1775
-1871
lines changed

6 files changed

+1775
-1871
lines changed

callhierarchy.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,6 @@ type CallHierarchy struct {
1313
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
1414
}
1515

16-
// CallHierarchyOptions option of CallHierarchy.
17-
//
18-
// @since 3.16.0.
19-
type CallHierarchyOptions struct {
20-
WorkDoneProgressOptions
21-
}
22-
23-
// CallHierarchyRegistrationOptions registration options of CallHierarchy.
24-
//
25-
// @since 3.16.0.
26-
type CallHierarchyRegistrationOptions struct {
27-
TextDocumentRegistrationOptions
28-
CallHierarchyOptions
29-
StaticRegistrationOptions
30-
}
31-
3216
// CallHierarchyPrepareParams params of CallHierarchyPrepare.
3317
//
3418
// @since 3.16.0.

callhierarchy_gojay.go

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -35,66 +35,6 @@ var (
3535
_ gojay.UnmarshalerJSONObject = (*CallHierarchy)(nil)
3636
)
3737

38-
// MarshalJSONObject implements gojay.MarshalerJSONObject.
39-
func (v *CallHierarchyOptions) MarshalJSONObject(enc *gojay.Encoder) {
40-
enc.BoolKeyOmitEmpty(keyWorkDoneProgress, v.WorkDoneProgress)
41-
}
42-
43-
// IsNil returns wether the structure is nil value or not.
44-
func (v *CallHierarchyOptions) IsNil() bool { return v == nil }
45-
46-
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject.
47-
func (v *CallHierarchyOptions) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
48-
if k == keyWorkDoneProgress {
49-
return dec.Bool(&v.WorkDoneProgress)
50-
}
51-
return nil
52-
}
53-
54-
// NKeys returns the number of keys to unmarshal.
55-
func (v *CallHierarchyOptions) NKeys() int { return 1 }
56-
57-
// compile time check whether the CallHierarchyOptions implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces.
58-
var (
59-
_ gojay.MarshalerJSONObject = (*CallHierarchyOptions)(nil)
60-
_ gojay.UnmarshalerJSONObject = (*CallHierarchyOptions)(nil)
61-
)
62-
63-
// MarshalJSONObject implements gojay.MarshalerJSONObject.
64-
func (v *CallHierarchyRegistrationOptions) MarshalJSONObject(enc *gojay.Encoder) {
65-
enc.AddArrayKey(keyDocumentSelector, &v.DocumentSelector)
66-
enc.BoolKeyOmitEmpty(keyWorkDoneProgress, v.WorkDoneProgress)
67-
enc.StringKeyOmitEmpty(keyID, v.ID)
68-
}
69-
70-
// IsNil implements gojay.MarshalerJSONObject.
71-
func (v *CallHierarchyRegistrationOptions) IsNil() bool { return v == nil }
72-
73-
// UnmarshalJSONObject implements gojay.UnmarshalerJSONObject.
74-
func (v *CallHierarchyRegistrationOptions) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
75-
switch k {
76-
case keyDocumentSelector:
77-
if v.DocumentSelector == nil {
78-
v.DocumentSelector = DocumentSelector{}
79-
}
80-
return dec.Array(&v.DocumentSelector)
81-
case keyWorkDoneProgress:
82-
return dec.Bool(&v.WorkDoneProgress)
83-
case keyID:
84-
return dec.String(&v.ID)
85-
}
86-
return nil
87-
}
88-
89-
// NKeys implements gojay.UnmarshalerJSONObject.
90-
func (v *CallHierarchyRegistrationOptions) NKeys() int { return 3 }
91-
92-
// compile time check whether the CallHierarchyRegistrationOptions implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces.
93-
var (
94-
_ gojay.MarshalerJSONObject = (*CallHierarchyRegistrationOptions)(nil)
95-
_ gojay.UnmarshalerJSONObject = (*CallHierarchyRegistrationOptions)(nil)
96-
)
97-
9838
// MarshalJSONObject implements gojay.MarshalerJSONObject.
9939
func (v *CallHierarchyPrepareParams) MarshalJSONObject(enc *gojay.Encoder) {
10040
enc.ObjectKeyOmitEmpty(keyTextDocument, &v.TextDocument)

0 commit comments

Comments
 (0)