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

completion: Prompt picking type of provider/data/resource automatically #300

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Nov 13, 2020

Depends on hashicorp/hcl-lang#5
Closes hashicorp/vscode-terraform#373

This enhances the UX around completion of provider, data source and resource completion by automatically triggering the suggestion box on the client. This accounts for the fact that people expect on-type completion to work throughout the document and it doesn't work in labels due to the fact that quotes trigger some kind of "string literal mode" in some editors, such as VS Code. See more at hashicorp/vscode-terraform#373

It may feel like a hack, but FWIW the Dart language server and the Scala one use the special command name, which seems registered by VS Code and also Sublime Text at this point, but I wouldn't be surprised if other editors/plugins followed the suit.

microsoft/language-server-protocol#565 tracks a related LSP feature.

Before

(label completion had to be manually triggered via Ctrl+Space)

2020-11-13 16 52 26

After

(label completion triggered automatically)
2020-11-13 16 54 48

@radeksimko radeksimko requested a review from a team November 13, 2020 18:33
@radeksimko radeksimko merged commit 487c81a into master Nov 16, 2020
@radeksimko radeksimko deleted the f-trigger-suggest branch November 16, 2020 10:00
@ghost
Copy link

ghost commented Dec 16, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autocomplete does not work correctly for the resource type
2 participants