Skip to content

Commit de600c5

Browse files
committed
Handling of non-standard $/setTraceNotification message
1 parent 5446598 commit de600c5

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ require (
99
github.com/pkg/errors v0.9.1
1010
github.com/stretchr/testify v1.7.0
1111
go.bug.st/json v1.15.6
12-
go.bug.st/lsp v0.0.0-20211124092226-438f5e4ddeb8
12+
go.bug.st/lsp v0.0.0-20211130152916-c597b0a0439f
1313
google.golang.org/grpc v1.42.0
1414
)

Diff for: go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ go.bug.st/downloader/v2 v2.1.1 h1:nyqbUizo3E2IxCCm4YFac4FtSqqFpqWP+Aae5GCMuw4=
337337
go.bug.st/downloader/v2 v2.1.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13RzVII=
338338
go.bug.st/json v1.15.6 h1:pvSpotu6f5JoCbx1TnKn6asVH7o9Tg2/GKsZSVzBOsc=
339339
go.bug.st/json v1.15.6/go.mod h1:bh58F9adz5ePlNqtvbuXuXcf9k6IrDLKH6lJUsHP3TI=
340-
go.bug.st/lsp v0.0.0-20211124092226-438f5e4ddeb8 h1:QSRqT2ezfvXfeUmK5znFE4KsnTYe+26oQdFV2Yvtwrc=
341-
go.bug.st/lsp v0.0.0-20211124092226-438f5e4ddeb8/go.mod h1:oYTh1uf5hI1teV5crrWut41Pk8vD/NqIjs4zD+No5FE=
340+
go.bug.st/lsp v0.0.0-20211130152916-c597b0a0439f h1:Rj7FdBdROWh9mMra/16G/5d7u/QE0Wwq487NZt+Evjg=
341+
go.bug.st/lsp v0.0.0-20211130152916-c597b0a0439f/go.mod h1:oYTh1uf5hI1teV5crrWut41Pk8vD/NqIjs4zD+No5FE=
342342
go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18 h1:F1qxtaFuewctYc/SsHRn+Q7Dtwi+yJGPgVq8YLtQz98=
343343
go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18/go.mod h1:Cx1VqMtEhE9pIkEyUj3LVVVPkv89dgW8aCKrRPDR/uE=
344344
go.bug.st/serial v1.3.2/go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg=

Diff for: ls/ls.go

+5
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,11 @@ func (ls *INOLanguageServer) WindowWorkDoneProgressCreateReqFromClangd(ctx conte
12231223
return nil
12241224
}
12251225

1226+
func (ls *INOLanguageServer) SetTraceNotifFromIDE(logger jsonrpc.FunctionLogger, params *lsp.SetTraceParams) {
1227+
logger.Logf("Notification level set to: %s", params.Value)
1228+
ls.Clangd.conn.SetTrace(params)
1229+
}
1230+
12261231
// Close closes all the json-rpc connections and clean-up temp folders.
12271232
func (ls *INOLanguageServer) Close() {
12281233
if ls.Clangd != nil {

Diff for: ls/lsp_server_ide.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func (server *IDELSPServer) Exit(logger jsonrpc.FunctionLogger) {
217217
}
218218

219219
func (server *IDELSPServer) SetTrace(logger jsonrpc.FunctionLogger, params *lsp.SetTraceParams) {
220-
panic("unimplemented")
220+
server.ls.SetTraceNotifFromIDE(logger, params)
221221
}
222222

223223
func (server *IDELSPServer) WindowWorkDoneProgressCancel(logger jsonrpc.FunctionLogger, params *lsp.WorkDoneProgressCancelParams) {

0 commit comments

Comments
 (0)