summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonlanguageclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r--src/plugins/python/pythonlanguageclient.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp
index 76e6fc2cb3..887911e805 100644
--- a/src/plugins/python/pythonlanguageclient.cpp
+++ b/src/plugins/python/pythonlanguageclient.cpp
@@ -526,9 +526,9 @@ PyLSConfigureAssistant *PyLSConfigureAssistant::instance()
const StdIOSettings *PyLSConfigureAssistant::languageServerForPython(const FilePath &python)
{
+ const FilePath pythonModulePath = getPylsModulePath({python, {"-m", "pylsp"}});
return findOrDefault(configuredPythonLanguageServer(),
- [pythonModulePath = getPylsModulePath(
- CommandLine(python, {"-m", "pylsp"}))](const StdIOSettings *setting) {
+ [pythonModulePath](const StdIOSettings *setting) {
return getPylsModulePath(setting->command()) == pythonModulePath;
});
}