From 97ad46d4931e6fe6e5003730784e0e1f44177c95 Mon Sep 17 00:00:00 2001 From: Jack Cherng Date: Sat, 20 Jul 2024 05:16:19 +0800 Subject: [PATCH] refactor: tidy codes Signed-off-by: Jack Cherng --- plugin/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/client.py b/plugin/client.py index f820718..71c36b1 100644 --- a/plugin/client.py +++ b/plugin/client.py @@ -58,10 +58,10 @@ def required_node_version(cls) -> str: @classmethod def should_ignore(cls, view: sublime.View) -> bool: return bool( - # ignore REPL views (https://github.com/sublimelsp/LSP-pyright/issues/343) + # SublimeREPL views view.settings().get("repl") - # ignore Python-like syntax test files - or view.substr(sublime.Region(0, 20)).startswith("# SYNTAX TEST ") + # syntax test files + or os.path.basename(view.file_name() or "").startswith("syntax_test") ) @classmethod