Skip to content

Commit c3eac7a

Browse files
committed
Added InitializedParams lsp structure
1 parent 8a67a18 commit c3eac7a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Diff for: handler/handler.go

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ func (handler *InoHandler) HandleMessageFromIDE(ctx context.Context, conn *jsonr
127127
// method "initialize"
128128
err = handler.initializeWorkbench(ctx, p)
129129

130+
case *lsp.InitializedParams:
131+
// method "initialized"
132+
log.Println("--> initialized")
133+
130134
case *lsp.DidOpenTextDocumentParams:
131135
// method "textDocument/didOpen"
132136
uri = p.TextDocument.URI

Diff for: lsp/protocol.go

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ func ReadParams(method string, raw *json.RawMessage) (interface{}, error) {
1313
params := new(InitializeParams)
1414
err := json.Unmarshal(*raw, params)
1515
return params, err
16+
case "initialized":
17+
return &InitializedParams{}, nil
1618
case "textDocument/didOpen":
1719
params := new(DidOpenTextDocumentParams)
1820
err := json.Unmarshal(*raw, params)

Diff for: lsp/service.go

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type InitializeParams struct {
2525
WorkDoneToken string `json:"workDoneToken,omitempty"`
2626
}
2727

28+
type InitializedParams struct{}
29+
2830
// Root returns the RootURI if set, or otherwise the RootPath with 'file://' prepended.
2931
func (p *InitializeParams) Root() DocumentURI {
3032
if p.RootURI != "" {

0 commit comments

Comments
 (0)