Open
Description
Background
Code Actions make an important part of LSP and we can anticipate many use cases in Terraform: https://github.com/hashicorp/terraform-ls/issues?page=2&q=is%3Aopen+is%3Aissue+label%3AtextDocument%2FcodeAction
Therefore it is important to ensure new ones are easy to implement and existing easy to maintain. This can be achieved through appropriate abstraction layers.
Proposal
- Introduce Code Actions hcl-lang#363
- Ensure
DecoderContext
gets populated with all[]CodeActionImpl
- Update
textDocument/codeAction
handler to use the new abstraction layers
Implementation Notes
This issue intentionally does not focus on specific code actions, which are filled as separate issues. It is considered a dependency for all of them however. It is assumed that any/all of the linked code actions can be implemented on top of the logic this issue talks about.