feat: add OpenTofu language support#1304
Open
Sensoramo wants to merge 2 commits into
Open
Conversation
MischaPanch
reviewed
Apr 9, 2026
| class TestLanguageServerBasics: | ||
| """Test basic functionality of the OpenTofu language server configuration.""" | ||
|
|
||
| @pytest.mark.parametrize("language_server", [Language.OPENTOFU], indirect=True) |
Member
There was a problem hiding this comment.
I think these tests can be safely deleted, right? The language server is the same for opentofu and terraform, so you are just repeating the terraform tests here.
A better approach would have been to add some opentofu specific things to existing test resources and tests, if this exists
420a0ba to
016ccbe
Compare
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.
Summary
Adds first-class
opentofulanguage support to Serena by reusing the existingTerraform language server integration.
Changes
Language.OPENTOFUTerraformLStofu,terraform,TOFU_CLI_PATH, andTERRAFORM_CLI_PATH.tfvarsand.tfstatefrom symbol indexing to avoidterraform-lsdocumentSymbol failures
Verification
uv run --extra dev python -m pytest test/solidlsp/terraform/ test_terraform_basic.py test/solidlsp/opentofu/test_opentofu_basic.py -quv run --extra dev poe lintuv run --extra dev poe type-checkNotes
OpenTofu support is implemented as a low-risk extension of the existing Terraform
integration rather than a separate language server implementation.