From 7202823b182977004cc645fc397a0fb430443631 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Mon, 14 Feb 2022 12:22:07 -0500 Subject: [PATCH] Clear diagnostics when closing documents --- pylsp/python_lsp.py | 1 + 1 file changed, 1 insertion(+) 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):