Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jpogran committed Feb 2, 2022
1 parent 55d1c08 commit c73ed71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions internal/langserver/handlers/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ func (svc *service) Initialize(ctx context.Context, params lsp.InitializeParams)

serverCaps.Capabilities.SemanticTokensProvider = semanticTokensOpts

svc.jrpcSvr = jrpc2.ServerFromContext(ctx)

// set commandPrefix for session
lsctx.SetCommandPrefix(ctx, out.Options.CommandPrefix)
// apply prefix to executeCommand handler names
Expand Down
5 changes: 2 additions & 3 deletions internal/langserver/handlers/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ type service struct {
server session.Server
diagsNotifier *diagnostics.Notifier

jrpcSvr *jrpc2.Server

additionalHandlers map[string]rpch.Func
}

Expand Down Expand Up @@ -450,10 +448,11 @@ func (svc *service) configureSessionDependencies(ctx context.Context, cfgOpts *s
sendModuleTelemetry(svc.sessCtx, svc.stateStore, svc.telemetry),
func(_, newMod *state.Module) {
svc.logger.Printf("Sending refresh notification for %s", newMod.Path)
_, err := svc.jrpcSvr.Callback(svc.srvCtx, "workspace/semanticTokens/refresh", nil)
_, err := jrpc2.ServerFromContext(ctx).Callback(svc.srvCtx, "workspace/semanticTokens/refresh", nil)
if err != nil {
svc.logger.Printf("Error refreshing %s: %s", newMod.Path, err)
}
svc.logger.Printf("Sending refresh notification for %s", newMod.Path)
},
}

Expand Down

0 comments on commit c73ed71

Please sign in to comment.