Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Source/cLSPClients.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1061,12 +1061,14 @@ class procedure TPyLspClient.ProjectPythonPathChanged(const Sender:

FProjectPythonPath := NewPath;

if (Length(Params.event.removed) > 0) or (Length(Params.event.added) > 0) then
if (Length(Params.event.removed) > 0) or (Length(Params.event.added) > 0) then begin
for var Client in LspClients do
if Client.Ready and
Client.FLspClient.IsRequestSupported(lspDidChangeWorkspaceFolders)
then
Client.FLspClient.SendNotification(lspDidChangeWorkspaceFolders, Params);
RestartServers;
end;
end;

class procedure TPyLspClient.PythonVersionChanged(const Sender: TObject; const
Expand Down
7 changes: 6 additions & 1 deletion Source/dmCommands.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1682,10 +1682,15 @@ procedure TCommandsDataModule.actPythonPathExecute(Sender: TObject);
if not GI_PyControl.PythonLoaded then Exit;

var Paths := TStringList.Create;
var PathsCurrent := TStringList.Create;
try
GI_PyControl.ActiveInterpreter.SysPathToStrings(Paths);
PathsCurrent.Assign(Paths);
if EditFolderList(Paths, _('Python Path'), 870) then
GI_PyControl.ActiveInterpreter.StringsToSysPath(Paths);
if not PathsCurrent.Equals(Paths) then begin
GI_PyControl.ActiveInterpreter.StringsToSysPath(Paths);
TPyLspClient.RestartServers;
end;
finally
Paths.Free;
end;
Expand Down