Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename *Traversal* to *Reference* #1574

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/syntax-highlighting.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Fallback types are chosen based on meaningful semantic mapping and default theme
| `hcl-objectKey` | `parameter` |
| `hcl-mapKey` | `parameter` |
| `hcl-keyword` | `variable` |
| `hcl-traversalStep` | `variable` |
| `hcl-referenceStep` | `variable` |
| `hcl-typeComplex` | `function` |
| `hcl-typePrimitive` | `keyword` |
| `hcl-functionName` | `function` |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hc-install v0.6.2
github.com/hashicorp/hcl-lang v0.0.0-20240103135921-47e237825ab8
github.com/hashicorp/hcl-lang v0.0.0-20240110103543-edc6c698701f
github.com/hashicorp/hcl/v2 v2.19.1
github.com/hashicorp/terraform-exec v0.20.0
github.com/hashicorp/terraform-json v0.20.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ github.com/hashicorp/hc-install v0.6.2 h1:V1k+Vraqz4olgZ9UzKiAcbman9i9scg9GgSt/U
github.com/hashicorp/hc-install v0.6.2/go.mod h1:2JBpd+NCFKiHiu/yYCGaPyPHhZLxXTpz8oreHa/a3Ps=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/hcl-lang v0.0.0-20240103135921-47e237825ab8 h1:k6yVHZVOscvP42QLuGFJhpjHQJIqYznGDTpjBnjSRCM=
github.com/hashicorp/hcl-lang v0.0.0-20240103135921-47e237825ab8/go.mod h1:yZkskHa0HSpPecxmoiLTuyXmxI9knxQOA+DGMgyOurM=
github.com/hashicorp/hcl-lang v0.0.0-20240110103543-edc6c698701f h1:74OR582709IK86+rpyIwnSdhRHu/fU/koRytzkDLflk=
github.com/hashicorp/hcl-lang v0.0.0-20240110103543-edc6c698701f/go.mod h1:yZkskHa0HSpPecxmoiLTuyXmxI9knxQOA+DGMgyOurM=
github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI=
github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo=
Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func toCompletionItem(candidate lang.Candidate, caps lsp.CompletionClientCapabil
kind = lsp.EnumCompletion
case lang.MapCandidateKind, lang.ObjectCandidateKind:
kind = lsp.StructCompletion
case lang.TraversalCandidateKind:
case lang.ReferenceCandidateKind:
kind = lsp.VariableCompletion
}

Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/symbols.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func exprSymbolKind(symbolKind lang.SymbolExprKind, supported []lsp.SymbolKind)
case cty.Number:
return supportedSymbolKind(supported, lsp.Number)
}
case lang.TraversalExprKind:
case lang.ReferenceExprKind:
return supportedSymbolKind(supported, lsp.Constant)
case lang.TupleConsExprKind:
return supportedSymbolKind(supported, lsp.Array)
Expand Down
4 changes: 2 additions & 2 deletions internal/lsp/token_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ func (te *TokenEncoder) resolveTokenType(token lang.SemanticToken) (semtok.Token
case lang.TokenKeyword:
return te.firstSupportedTokenType(
semtok.TokenType(lang.TokenKeyword), semtok.TokenTypeVariable)
case lang.TokenTraversalStep:
case lang.TokenReferenceStep:
return te.firstSupportedTokenType(
semtok.TokenType(lang.TokenTraversalStep), semtok.TokenTypeVariable)
semtok.TokenType(lang.TokenReferenceStep), semtok.TokenTypeVariable)
case lang.TokenTypeComplex:
return te.firstSupportedTokenType(
semtok.TokenType(lang.TokenTypeComplex), semtok.TokenTypeFunction)
Expand Down