@@ -82,6 +82,7 @@ func (s *LSPServer) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrp
82
82
}
83
83
84
84
func (s * LSPServer ) handleInitialize (ctx context.Context , req * jsonrpc2.Request ) (interface {}, error ) {
85
+ log .Printf ("Handling initialize: %+v" , req )
85
86
// Check if params is nil
86
87
if req .Params == nil {
87
88
return nil , & jsonrpc2.Error {
@@ -116,6 +117,7 @@ func (s *LSPServer) handleInitialize(ctx context.Context, req *jsonrpc2.Request)
116
117
}
117
118
118
119
func (s * LSPServer ) handleDidOpen (ctx context.Context , req * jsonrpc2.Request ) {
120
+ log .Printf ("Handling didOpen: %+v" , req )
119
121
var params lsproto.DidOpenTextDocumentParams
120
122
if err := json .Unmarshal (* req .Params , & params ); err != nil {
121
123
return
@@ -129,6 +131,7 @@ func (s *LSPServer) handleDidOpen(ctx context.Context, req *jsonrpc2.Request) {
129
131
}
130
132
131
133
func (s * LSPServer ) handleDidChange (ctx context.Context , req * jsonrpc2.Request ) {
134
+ log .Printf ("Handling didChange: %+v" , req )
132
135
var params lsproto.DidChangeTextDocumentParams
133
136
if err := json .Unmarshal (* req .Params , & params ); err != nil {
134
137
return
@@ -145,6 +148,7 @@ func (s *LSPServer) handleDidChange(ctx context.Context, req *jsonrpc2.Request)
145
148
}
146
149
147
150
func (s * LSPServer ) handleDidSave (ctx context.Context , req * jsonrpc2.Request ) {
151
+ log .Printf ("Handling didSave: %+v" , req )
148
152
// Re-run diagnostics on save
149
153
var params lsproto.DidSaveTextDocumentParams
150
154
@@ -163,6 +167,7 @@ func (s *LSPServer) handleShutdown(ctx context.Context, req *jsonrpc2.Request) (
163
167
}
164
168
165
169
func (s * LSPServer ) handleCodeAction (ctx context.Context , req * jsonrpc2.Request ) (interface {}, error ) {
170
+ log .Printf ("Handling codeAction: %+v" , req )
166
171
var params lsproto.CodeActionParams
167
172
if err := json .Unmarshal (* req .Params , & params ); err != nil {
168
173
return nil , & jsonrpc2.Error {
@@ -232,6 +237,7 @@ func (s *LSPServer) handleCodeAction(ctx context.Context, req *jsonrpc2.Request)
232
237
}
233
238
234
239
func (s * LSPServer ) runDiagnostics (ctx context.Context , uri lsproto.DocumentUri , content string ) {
240
+ log .Printf ("Running diagnostics for: %+v" , uri )
235
241
uriString := string (uri )
236
242
237
243
// Only process TypeScript/JavaScript files
0 commit comments