Skip to content

Commit

Permalink
Support Expression Extensions
Browse files Browse the repository at this point in the history
In hashicorp/hcl-lang#134 we now pass the context down to the decoder if using Hover or SemanticTokens.
  • Loading branch information
jpogran committed Oct 13, 2022
1 parent 81507c5 commit ce49882
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/langserver/handlers/hover.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (svc *service) TextDocumentHover(ctx context.Context, params lsp.TextDocume
}

svc.logger.Printf("Looking for hover data at %q -> %#v", doc.Filename, pos)
hoverData, err := d.HoverAtPos(doc.Filename, pos)
hoverData, err := d.HoverAtPos(ctx, doc.Filename, pos)
svc.logger.Printf("received hover data: %#v", hoverData)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/langserver/handlers/semantic_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (svc *service) TextDocumentSemanticTokensFull(ctx context.Context, params l
return tks, err
}

tokens, err := d.SemanticTokensInFile(doc.Filename)
tokens, err := d.SemanticTokensInFile(ctx, doc.Filename)
if err != nil {
return tks, err
}
Expand Down

0 comments on commit ce49882

Please sign in to comment.