Terraform-ls vs.code integration not working post 2.24

Using recent versions of terraform-ls in vs.code I’ve effectively lost the language server features. The log file is full of connection failures

Request textDocument/semanticTokens/full failed.
Error: Connection got disposed.
at Object.dispose (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:411455)
at Object.dispose (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:491538)
at T.handleConnectionClosed (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:491751)
at T.handleConnectionClosed (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:552097)
at t (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:489840)
at i.invoke (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:413068)
at o.fire (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:413829)
at Q (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:400713)
at i.invoke (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:413068)
at o.fire (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:413829)
at m.fireClose (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:425282)
at Socket. (c:\Users[USERNAME].vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\out\extension.js:1:426067)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12)

This is VS.Code on Windows 10. Reverting the language server version to 2.23 reverts the behaviour to that which I’d expect.

I’m sorry you’re encountering this issue. We made some changes to the extension settings in 2.24. The extension should have prompted you with a message box saying that settings needed to be changed and given you options to either update it automatically, manually, ignore the warning or see the documentation.

We have a document explaining all this in detail at vscode-terraform/settings-migration.md at main · hashicorp/vscode-terraform · GitHub.

If things are still not working after modifying the settings, please let us know.

Looks like I owe you an apology. I did get the settings dialog box, but could not see any that were incorrectly set. Having trawled through the output, I discovered that I had a memory access violation when loading/parsing one of the files in our (rather large) workspace. Removing that folder temporarily from the VS.Code workspace also resolves the issue for me. I conclude that there’s probably an issue with that file that I’ll need to investigate at some point.