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

Backfill standard library function & parameter descriptions #136

Closed
wants to merge 12 commits into from

Conversation

dbanck
Copy link
Contributor

@dbanck dbanck commented Oct 11, 2022


This PR backfills all the descriptions for functions and parameters used by Terraform.

Background

To be able to offer auto-completion of available functions and their signatures within the Terraform language server, we need a longer description for both a function and each parameter.

More information is available in the TF-418: Support Functions in Language Server RFC.

Changes

I've added a description to all function definitions, and their parameters that Terraform is currently using. The function description is a direct copy of the documentation's first paragraph. I mostly made up the parameter descriptions based on text snippets. It might make sense to have a technical writer make sure those provide the right context.

gofmt made some changes to a few larger comments.

UX

This is how the descriptions appear in VS Code.

Auto-completion of functions

2022-10-12 10 21 48

The function signature is displayed to the right and below that the description.

Signature help for a function

2022-10-12 11 02 13

CleanShot 2022-10-12 at 17 31 20@2x

The parameter descriptions (1) appears below the function signature and the function description (2) below that.

On hover over a function

2022-10-12 11 02 40

The function description is displayed below the signature.

Misc

I don't know if it's helpful to others, but I've created a list of all Terraform functions, their introduction, and their source to track the work.

@dbanck
Copy link
Contributor Author

dbanck commented Oct 25, 2022

This isn't required anymore. 2d26b96 added english-language descriptions for functions.

@dbanck dbanck closed this Oct 25, 2022
@dbanck dbanck deleted the f-annotate-functions branch October 25, 2022 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant