Skip to content

Commit 21fbdd7

Browse files
committed
WIP4
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 0668399 commit 21fbdd7

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,3 @@ func (c *client) WorkspaceFolders(ctx context.Context) (result []WorkspaceFolder
411411

412412
return result, nil
413413
}
414-

protocol/lifecycle.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
package protocol
55

6+
import "bytes"
7+
68
// TextDocumentSyncKind defines how the host (editor) should sync document changes to the language server.
79
type TextDocumentSyncKind uint32
810

@@ -1289,6 +1291,24 @@ type ServerCapabilities struct {
12891291
Experimental any `json:"experimental,omitempty"`
12901292
}
12911293

1294+
func (t ServerCapabilities) MarshalJSON() ([]byte, error) {
1295+
var b bytes.Buffer
1296+
buf, err := t.TextDocumentSync.MarshalJSON()
1297+
if err != nil {
1298+
return nil, err
1299+
}
1300+
b.Write(buf)
1301+
1302+
return b.Bytes(), nil
1303+
}
1304+
1305+
func (t *ServerCapabilities) UnmarshalJSON(x []byte) error {
1306+
if err := t.TextDocumentSync.UnmarshalJSON(x); err != nil {
1307+
return err
1308+
}
1309+
return nil
1310+
}
1311+
12921312
// ServerInfo information about the server 3.15.0 3.18.0 ServerInfo type name added. @proposed.
12931313
//
12941314
// @since 3.18.0 ServerInfo type name added. proposed

server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,4 +1892,3 @@ func (s *server) Request(ctx context.Context, method string, params interface{})
18921892

18931893
return result, nil
18941894
}
1895-

0 commit comments

Comments
 (0)