Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Fix(lsp-terraform): Adapt keywords to use underscores for lsp-mode core compatibility#4806
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
It looks like there is a compile error: 🤔 |
These initial changes was originally done by me when implementing the terraform lsp client. IIRC, having it like |
Actually, I rarely write Terraform-related codes. I modified it only because this compilation error in it caused issues with the overall LSP configuration when I reset my Emacs. At least for now, the modified code runs well in my environment. And I will try to re-verify and reproduce the issue at a later time in the near future. If there is any further information, I will promptly sync it with you. |

This PR fixes compilation errors in
clients/lsp-terraform.elwhen used with recent versions oflsp-mode20250531.742`Fixes#4805
Problem:
The
lsp-terraform.elfile (which has not been updated in the main repository for approximately a year) started failing to compile. The errors consistently followed the pattern:Error: Unknown key: :some-key-with-hyphen. Available keys: (... :some_key_with_underscore ...)This occurred for several multi-word keywords within
lsp-defundestructuring forms, such as:docs-link(expected:docs_link) and:provider-requirements(expected:provider_requirements).This suggests a change in
lsp-modecore's keyword handling or its internal type definitions for data related toterraform-ls, now favoring/expecting underscores for these specific multi-word keys.Solution:
This PR updates the affected keywords in
lsp-terraform.elwithinlsp-defunparameter destructuring (for types like&terraform-ls:Module,&terraform-ls:Providers, etc.) to use the underscore convention, matching the "Available keys" provided in the compilation error messages. Corresponding local variable names have also been updated to use underscores.These changes allow
lsp-terraform.elto compile successfully with the currentlsp-modecore.