Add underscore as a completion trigger character - #153
Conversation
This allows editors to request completions easier when a end-user inputs "_" inside a resource type label for example, (e.g `resource "aws_`) This improves the completion experience along with opentofu/hcl-lang#2 to allow users to get improved completion when writing resources Signed-off-by: James Humphries <james@james-humphries.co.uk>
apparentlymart
left a comment
There was a problem hiding this comment.
With the caveat that I'm not particularly familiar with how this part of the protocol works, the reason for this makes sense to me and I can imagine the implementation working as long as the code which handles the completion requests is able to notice that it's already partway through an identifier.
(And I assume that must be true because it's always possible for the user to explicitly request completion at any point in the input, and so from the perspective of the completion code this should be just like explicitly requesting completion immediately after you type _, right?)
|
Oh heh somehow between starting to read this and actually leaving my review I forgot that you mentioned opentofu/hcl-lang#2, which deals with the question I asked in the second part of my approval. Sorry... early morning brain. 🤦♂️ |
This allows editors to request completions easier when a end-user inputs "_" inside a resource type label for example, (e.g
resource "aws_)This improves the completion experience along with opentofu/hcl-lang#2 to allow users to get improved completion when writing resources
Resolves https://www.reddit.com/r/Terraform/comments/1r14jlr/help_with_terraformls_trigger_characters_andor/
Checklist
Go checklist