You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hcl-lang library should therefore provide an abstraction layer to enable implementations of these actions so that servers can agree on how this is done.
While code actions can be useful on their own, a significant portion of them will relate to a diagnostic ("quick fixes"). Such actions can be built on top of PathDecoder.Validate() and PathDecoder.ValidateFile().
The initial scope of this work is to enable single-file scoped code actions. The proposed abstraction should allow later expansion for multi-file and multi-folder support though.
The text was updated successfully, but these errors were encountered:
Background
Code actions is one of the major features of LSP and there is a great number of use cases anticipated in the context of the Terraform LS: https://github.com/hashicorp/terraform-ls/issues?page=2&q=is%3Aopen+is%3Aissue+label%3AtextDocument%2FcodeAction
The hcl-lang library should therefore provide an abstraction layer to enable implementations of these actions so that servers can agree on how this is done.
While code actions can be useful on their own, a significant portion of them will relate to a diagnostic ("quick fixes"). Such actions can be built on top of
PathDecoder.Validate()
andPathDecoder.ValidateFile()
.hcl-lang/decoder/validate.go
Line 18 in 8067e8d
hcl-lang/decoder/validate.go
Line 45 in 8067e8d
Proposal
Code
toDiagnostic
hcl#647validator
package produce diagnostics with appropriate uniqueCode
DecoderContext
field:decoder.Decoder
method:decodercontext
package:lang
:Implementation Prototype
https://github.com/hashicorp/hcl-lang/compare/f-code-actions-prototype
Notes
The initial scope of this work is to enable single-file scoped code actions. The proposed abstraction should allow later expansion for multi-file and multi-folder support though.
The text was updated successfully, but these errors were encountered: