Skip to content

Adds support for additional language IDs - terraform and terraform-vars - #102

Merged
Gogotchuri merged 2 commits into
mainfrom
multiple-language-ids
Jul 24, 2025
Merged

Adds support for additional language IDs - terraform and terraform-vars#102
Gogotchuri merged 2 commits into
mainfrom
multiple-language-ids

Conversation

@Gogotchuri

@Gogotchuri Gogotchuri commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

This issue arose while I was working on the USAGE.md ( #48 ) rewrite and testing tofu-ls with several different editors.
To facilitate integration with a wide range of editors and IDEs, we add support for the language IDs: 'terraform' and 'terraform-vars'.
Remapping extensions and language names can be a bit cumbersome in some cases, and this change will eliminate the need for it.
In earlier iterations, we modified the language IDs to opentofu and opentofu-vars. Now we extend the language server to accept the other pair too.

Checklist

  • I have read the contribution guide.
  • I have not used an AI coding assistant to create this PR.
  • I have written all code in this PR myself OR I have marked all code I have not written myself (including modified code, e.g. copied from other places and then modified) with a comment indicating where it came from.
  • I (and other contributors to this PR) have not looked at the Terraform source code while implementing this PR.
  • If I'm releasing, I have read the releasing guide.

Go checklist

  • I have run golangci-lint on my change and receive no errors relevant to my code.
  • I have run existing tests to ensure my code doesn't break anything.
  • I have added tests for all relevant use cases of my code, and those tests are passing.
  • I have only exported functions, variables and structs that should be used from other packages.
  • I have added meaningful comments to all exported functions, variables, and structs.

…rs to make integration with certain editors easier

Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
@Gogotchuri
Gogotchuri requested a review from a team as a code owner July 21, 2025 14:17
@Gogotchuri
Gogotchuri marked this pull request as draft July 21, 2025 14:20
@diofeher

Copy link
Copy Markdown
Member

Interesting @Gogotchuri ! Are you testing with both extensions installed at the same time?

Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
@Gogotchuri

Copy link
Copy Markdown
Contributor Author

Interesting @Gogotchuri ! Are you testing with both extensions installed at the same time?

I haven't done testing in VSCode, but if you could, that would be nice. I'm not sure this will solve the issue you are hinting at, but it avoids a lot of unnecessary complications in editor usage.

@Gogotchuri
Gogotchuri marked this pull request as ready for review July 22, 2025 10:10
@diofeher diofeher mentioned this pull request Jul 23, 2025
10 tasks

@diofeher diofeher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great idea @Gogotchuri ! Thanks for implementing it :)

@Gogotchuri
Gogotchuri merged commit 5ae11ff into main Jul 24, 2025
21 checks passed
@Gogotchuri
Gogotchuri deleted the multiple-language-ids branch July 24, 2025 08:47
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.

3 participants