From 12c73a6e4a60c26670b9ae8b0cc8de48dea514b9 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 10 Sep 2026 05:29:19 -0500 Subject: [PATCH] vimPlugins.copilot-lua: fix packaged language server Version 3.1.5 selects the server through server.custom_server_filepath. Set that default to the packaged executable instead of rewriting the old bundled JavaScript path. --- .../editors/vim/plugins/overrides.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 8320ae529322..c0e301bfcbe1 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1027,18 +1027,11 @@ assertNoAdditions { }; copilot-lua = super.copilot-lua.overrideAttrs { - # Avoid copying the bundled 500MB language server into the plugin output. - preInstall = '' - rm -rf copilot/js - ''; - - postInstall = '' - mkdir -p $target/copilot - ln -s ${copilot-language-server}/share/copilot-language-server $target/copilot/js - - substituteInPlace $target/lua/copilot/lsp/nodejs.lua \ - --replace-fail "copilot/js/language-server.js" "copilot/js/main.js" - sed -i 's/version = "[^"]*"/version = "${copilot-language-server.version}"/' $target/lua/copilot/util.lua + # Use the packaged language server instead of the runtime installer. + postPatch = '' + substituteInPlace lua/copilot/config/server.lua \ + --replace-fail 'custom_server_filepath = nil,' \ + 'custom_server_filepath = "${lib.getExe copilot-language-server}",' ''; runtimeDeps = [