diff --git a/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix b/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix index b2c61f1b0867..d6a72f85ceef 100644 --- a/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix +++ b/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix @@ -7,14 +7,13 @@ vscode-utils.buildVscodeMarketplaceExtension { mktplcRef = { name = "terraform"; publisher = "hashicorp"; - version = "2.19.0"; - hash = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY="; + version = "2.34.3"; + hash = "sha256-kE9xH0cp741aCqhrwFDW+lQxOAsdLNzCCOTWMxd+li0="; }; - patches = [ ./fix-terraform-ls.patch ]; - postPatch = '' - substituteInPlace out/serverPath.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls + substituteInPlace dist/extension.js \ + --replace-fail 'this.customBinPath=Ga("terraform").get("languageServer.path")' 'this.customBinPath = Ga("terraform").get("languageServer.path") || '${terraform-ls}/bin/terraform-ls';' ''; meta = { diff --git a/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/fix-terraform-ls.patch b/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/fix-terraform-ls.patch deleted file mode 100644 index e2dcd0b70aa9..000000000000 --- a/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/fix-terraform-ls.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/out/serverPath.js b/out/serverPath.js -index fafa915..2e6d376 100644 ---- a/out/serverPath.js -+++ b/out/serverPath.js -@@ -18,7 +18,13 @@ exports.CUSTOM_BIN_PATH_OPTION_NAME = 'languageServer.pathToBinary'; - class ServerPath { - constructor(context) { - this.context = context; -- this.customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME); -+ -+ const customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME); -+ if (!customBinPath) { -+ this.customBinPath = 'TERRAFORM-LS-PATH'; -+ } else { -+ this.customBinPath = customBinPath; -+ } - } - installPath() { - return path.join(this.context.globalStorageUri.fsPath, INSTALL_FOLDER_NAME);