Skip to content

Commit

Permalink
Don't attach LSP to syntax test files
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann committed Oct 15, 2024
1 parent a6b17a4 commit 870ca1b
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 @@ -55,6 +55,7 @@
from .session_buffer import SessionBuffer
from .session_view import SessionView
from functools import partial
from os.path import basename
from typing import Any, Callable, Generator, Iterable
from typing import cast
from weakref import WeakSet
Expand All @@ -75,6 +76,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 870ca1b

Please sign in to comment.