Ensure correct usage of language IDs - #147
Merged
Merged
Conversation
There are currently 5 actions that are not using `ilsp.ParseLanguageID`
which causes a language mismatch ("terraform" != "opentofu") and so some
items are thrown away (For example, references).
This patch ensures that all references to the document's language ID
also goes through `ilsp.ParseLanguageID`
Resolves #127
Signed-off-by: James Humphries <james@james-humphries.co.uk>
1 task
Gogotchuri
approved these changes
Dec 11, 2025
Gogotchuri
left a comment
Contributor
There was a problem hiding this comment.
Awesome! It appears to be the correct approach for the time being.
We might want to embed language ID evaluation into hcl-lang to ensure we treat "opentofu" and "terraform" the same.
I have mentioned somewhere before that this need for mapping stems from the fact that most editors have a single mapping for .tf files ("terraform"), and it will take a long time for all of them to also identify those files as "opentofu".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are currently 5 actions that are not using
ilsp.ParseLanguageIDwhich causes a language mismatch ("terraform" != "opentofu") and so some items are thrown away (For example, references).This patch ensures that all references to the document's language ID also goes through
ilsp.ParseLanguageIDResolves #127
Checklist
Go checklist