From 04d92b9134a9f3d4208d4804992d2e91e94d801f Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 19 Sep 2024 13:14:26 +0200 Subject: [PATCH] LuaLS: Only restart client if binary changed Change-Id: I55738be78a527c22e681fca77b17ff428907c7d1 Reviewed-by: David Schulz --- share/qtcreator/lua-plugins/luals/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/lua-plugins/luals/init.lua b/share/qtcreator/lua-plugins/luals/init.lua index 22257479fc2..1999ad83263 100644 --- a/share/qtcreator/lua-plugins/luals/init.lua +++ b/share/qtcreator/lua-plugins/luals/init.lua @@ -79,8 +79,10 @@ local function installOrUpdateServer() binary = "bin/lua-language-server.exe" end - Settings.binary:setValue(lspPkgInfo.path:resolvePath(binary)) - Settings:apply() + if lspPkgInfo.path:resolvePath(binary) ~= Settings.binary.expandedValue then + Settings.binary:setValue(lspPkgInfo.path:resolvePath(binary)) + Settings:apply() + end return end