diff --git a/spyder/plugins/projects/plugin.py b/spyder/plugins/projects/plugin.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/projects/plugin.py
+++ b/spyder/plugins/projects/plugin.py
@@ -266,9 +266,15 @@ class Projects(SpyderPluginWidget):
         dlg.sig_project_creation_requested.connect(self._create_project)

         dlg.sig_project_creation_requested.connect(self.sig_project_created)

         if dlg.exec_():

-            if (active_project is None

-                    and self.get_option('visible_if_project_open')):

-                self.show_explorer()

+            # A project was not open before

+            if active_project is None:

+                if self.get_option('visible_if_project_open'):

+                    self.show_explorer()

+            else:

+                # We are switching projects.

+                # TODO: Don't emit sig_project_closed when we support

+                # multiple workspaces.

+                self.sig_project_closed.emit(active_project.root_path)

             self.sig_pythonpath_changed.emit()

             self.restart_consoles()

 

@@ -312,6 +318,11 @@ class Projects(SpyderPluginWidget):
                 self.set_project_filenames(

                     self.main.editor.get_open_filenames())

 

+            # TODO: Don't emit sig_project_closed when we support

+            # multiple workspaces.

+            self.sig_project_closed.emit(

+                self.current_active_project.root_path)

+

         project = EmptyProject(path)

         self.current_active_project = project

         self.latest_project = project
Projects: Emit sig_project_closed when switching projects

- This can happen either when you have an open project and (i) Change to
another, existing project; or (ii) Create a new project.
- It's important to emit that signal to let the LSP know that the
previous open project needs to be removed from the workspace.
- This won't be necessary once we support multiple workspaces in the
interface, but for now it is.