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

Add LanguageID to file #539

Merged
merged 3 commits into from
May 28, 2021
Merged

Add LanguageID to file #539

merged 3 commits into from
May 28, 2021

Conversation

Nepomuceno
Copy link
Contributor

@Nepomuceno Nepomuceno commented May 27, 2021

Adding the language id so we could distinguish between tfvars and terraform files

This will assist the implementation for #50 and #519.

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good at first sight - can you also try wiring it up to didOpen handler now and maybe write a small integration test which checks that the languageID is stored?

See the existing test in https://github.com/hashicorp/terraform-ls/blob/main/internal/langserver/handlers/did_open_test.go for inspiration. You can create your own instance of the filesystem.Filesystem via fileystem.NewFilesystem(), pass it to the mock server and then check the languageID stored via GetDocument() & your new LanguageID() method.

Then I'd be happy to merge it - as storing language ID (although we wouldn't do anything with it yet) looks like a good-sized deliverable.

@Nepomuceno
Copy link
Contributor Author

Nepomuceno commented May 27, 2021

Added some test and hopefully fix the build
Of course that was not true ;) but now I think I fixed the build

@radeksimko radeksimko merged commit b348b5a into hashicorp:main May 28, 2021
@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants