Skip to content

Commit

Permalink
Don't attach LSP to syntax test files (#2531)
Browse files Browse the repository at this point in the history
Co-authored-by: Rafał Chłodnicki <[email protected]>
  • Loading branch information
jwortmann and rchl authored Oct 26, 2024
1 parent fbbbd77 commit a3dec7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from .session_view import SessionView
from functools import partial
from functools import wraps
from os.path import basename
from typing import Any, Callable, Generator, Iterable, TypeVar
from typing import cast
from typing_extensions import Concatenate, ParamSpec
Expand Down Expand Up @@ -95,6 +96,10 @@ def is_regular_view(v: sublime.View) -> bool:
return False
if v.settings().get('is_widget'):
return False
# Not a syntax test file.
if (filename := v.file_name()) and basename(filename).startswith('syntax_test_'):
return False
# Not a transient sheet (preview).
sheet = v.sheet()
if not sheet:
return False
Expand Down

0 comments on commit a3dec7c

Please sign in to comment.