Skip to content

Commit

Permalink
Fix validate on save
Browse files Browse the repository at this point in the history
The `/didSave` handler was missing WithModuleManager and WithExecutorFactory, which the validate command handler needs to find terraform to execute validate.
  • Loading branch information
jpogran committed Feb 22, 2022
1 parent 2586e64 commit bd89355
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/langserver/handlers/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ func (svc *service) Assigner() (jrpc2.Assigner, error) {
ctx = lsctx.WithDiagnosticsNotifier(ctx, svc.diagsNotifier)
ctx = lsctx.WithExperimentalFeatures(ctx, &expFeatures)
ctx = lsctx.WithModuleFinder(ctx, svc.modMgr)
ctx = lsctx.WithModuleManager(ctx, svc.modMgr)
ctx = exec.WithExecutorOpts(ctx, svc.tfExecOpts)
ctx = exec.WithExecutorFactory(ctx, svc.tfExecFactory)

return handle(ctx, req, lh.TextDocumentDidSave)
},
Expand Down

0 comments on commit bd89355

Please sign in to comment.