Skip to content

disable plugins on repl views - #2887

Merged
rchl merged 3 commits into
mainfrom
fix/disable-repl
Apr 29, 2026
Merged

rchl merged 3 commits into
mainfrom
fix/disable-repl

Conversation

@rchl

@rchl rchl commented Apr 29, 2026

Copy link
Copy Markdown
Member

This check is repeated in a bunch of packages. Lets simplify.

@jwortmann

Copy link
Copy Markdown
Member

That condition as it is now would disable LSP for all non-REPL views....

@jwortmann

Copy link
Copy Markdown
Member

I think there should at least be a comment with the package name that adds this setting.

@rchl

rchl commented Apr 29, 2026

Copy link
Copy Markdown
Member Author

with the package name

hmm?

@rchl
rchl merged commit 7299493 into main Apr 29, 2026
8 checks passed
@rchl
rchl deleted the fix/disable-repl branch April 29, 2026 19:23
@jwortmann

Copy link
Copy Markdown
Member

@rchl After looking at it again, maybe a better place for this condition would be in

LSP/plugin/documents.py

Lines 116 to 131 in def3cf8

def is_regular_view(v: sublime.View) -> bool:
# Not from the quick panel (CTRL+P), and not a special view like a console, output panel or find-in-files panels.
if v.element() is not None:
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
if sheet.is_transient():
return False
return True

Then it would be more consistent because it would also apply to manual configs.

Do you want to do a follow up PR to move that condition there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants