diff --git a/pylsp/python_lsp.py b/pylsp/python_lsp.py index c71f08b3..a11f6119 100644 --- a/pylsp/python_lsp.py +++ b/pylsp/python_lsp.py @@ -319,6 +319,7 @@ def m_completion_item__resolve(self, **completionItem): def m_text_document__did_close(self, textDocument=None, **_kwargs): workspace = self._match_uri_to_workspace(textDocument['uri']) + workspace.publish_diagnostics(textDocument['uri'], []) workspace.rm_document(textDocument['uri']) def m_text_document__did_open(self, textDocument=None, **_kwargs):