diff --git a/plugin/client.py b/plugin/client.py index 5e105a2..2cb7993 100644 --- a/plugin/client.py +++ b/plugin/client.py @@ -60,10 +60,12 @@ def required_node_version(cls) -> str: @classmethod def should_ignore(cls, view: sublime.View) -> bool: - # ignore REPL views (https://github.com/sublimelsp/LSP-pyright/issues/343) - if view.settings().get("repl"): - return True - return False + return bool( + # ignore REPL views (https://github.com/sublimelsp/LSP-pyright/issues/343) + view.settings().get("repl") + # ignore Python-like syntax test files + or view.substr(sublime.Region(0, 20)).startswith("# SYNTAX TEST ") + ) @classmethod def can_start(