Skip to content

Commit d33fc40

Browse files
authored
Merge pull request #27 from markdumay/main
Fix client capability for semantic tokens
2 parents 2770c74 + 9f6c20c commit d33fc40

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

capabilities_client.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,10 @@ type SemanticTokensWorkspaceClientCapabilitiesRequests struct {
926926
Range bool `json:"range,omitempty"`
927927

928928
// Full is the client will send the "textDocument/semanticTokens/full" request
929-
// if the server provides a corresponding handler.
930-
Full bool `json:"full,omitempty"` // delta?: boolean
929+
// if the server provides a corresponding handler. The client will send the
930+
// `textDocument/semanticTokens/full/delta` request if the server provides a
931+
// corresponding handler.
932+
Full interface{} `json:"full,omitempty"`
931933
}
932934

933935
// LinkedEditingRangeClientCapabilities capabilities specific to "textDocument/linkedEditingRange" requests.

capabilities_client_gojay.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ var (
18211821
// MarshalJSONObject implements gojay.MarshalerJSONObject.
18221822
func (v *SemanticTokensWorkspaceClientCapabilitiesRequests) MarshalJSONObject(enc *gojay.Encoder) {
18231823
enc.BoolKeyOmitEmpty(keyRange, v.Range)
1824-
enc.BoolKeyOmitEmpty(keyFull, v.Full)
1824+
enc.AddInterfaceKey(keyFull, v.Full)
18251825
}
18261826

18271827
// IsNil implements gojay.MarshalerJSONObject.
@@ -1833,7 +1833,7 @@ func (v *SemanticTokensWorkspaceClientCapabilitiesRequests) UnmarshalJSONObject(
18331833
case keyRange:
18341834
return dec.Bool(&v.Range)
18351835
case keyFull:
1836-
return dec.Bool(&v.Full)
1836+
return dec.Interface(&v.Full)
18371837
}
18381838
return nil
18391839
}

0 commit comments

Comments
 (0)