Skip to content

Commit

Permalink
fix: shouldn't work for Python syntax test files
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Jul 13, 2024
1 parent 6c26af2 commit e1ecc92
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e1ecc92

Please sign in to comment.