Skip to content

Commit

Permalink
Provide (less verbose) step-based completion
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Jun 25, 2021
1 parent cfbfee8 commit 09d38f9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/hashicorp/go-memdb v1.3.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-version v1.3.0
github.com/hashicorp/hcl-lang v0.0.0-20210616121206-bd34ebcc883b
github.com/hashicorp/hcl-lang v0.0.0-20210625122313-29045f308402
github.com/hashicorp/hcl/v2 v2.10.0
github.com/hashicorp/terraform-exec v0.13.3
github.com/hashicorp/terraform-json v0.12.0
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
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-20210616121206-bd34ebcc883b h1:KnQ9z7sjAD6mwqJR6vpCrkAU6GygOnnFnmgxW7bkmb4=
github.com/hashicorp/hcl-lang v0.0.0-20210616121206-bd34ebcc883b/go.mod h1:uMsq6wV8ZXEH8qndov4tncXlHDYnZ8aHsGmS4T74e2o=
github.com/hashicorp/hcl-lang v0.0.0-20210625122313-29045f308402 h1:dS/j/zM6hK7Be3BruXFFBOdmevskvTg7iCNfZHY3/ZE=
github.com/hashicorp/hcl-lang v0.0.0-20210625122313-29045f308402/go.mod h1:rDEzcPJU1AYRanWbpH9AZEik9i+jv1aoKkwqjfs7NyA=
github.com/hashicorp/hcl/v2 v2.10.0 h1:1S1UnuhDGlv3gRFV4+0EdwB+znNP5HmcGbIqwnSCByg=
github.com/hashicorp/hcl/v2 v2.10.0/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
Expand Down
4 changes: 3 additions & 1 deletion internal/langserver/handlers/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ func initializeResponse(t *testing.T, commandPrefix string) string {
"change": 2,
"save": {}
},
"completionProvider": {},
"completionProvider": {
"triggerCharacters": [".", "["]
},
"hoverProvider": true,
"signatureHelpProvider": {},
"documentSymbolProvider": true,
Expand Down
3 changes: 2 additions & 1 deletion internal/langserver/handlers/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ func (lh *logHandler) Initialize(ctx context.Context, params lsp.InitializeParam
Change: lsp.Incremental,
},
CompletionProvider: lsp.CompletionOptions{
ResolveProvider: false,
ResolveProvider: false,
TriggerCharacters: []string{".", "["},
},
CodeLensProvider: lsp.CodeLensOptions{},
HoverProvider: true,
Expand Down

0 comments on commit 09d38f9

Please sign in to comment.