-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: console text model uses the language ID #14854
fix: console text model uses the language ID #14854
Conversation
This is required to color the repl input based on the currently active text editor. Closes eclipse-theia#9261
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that this works as expected. However, I believe we're leaking a disposable, see below.
this is to avoid listener leak when a the model change listener is reassigned
getter/setter is not exposed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
@kittaakos @msujew should we merge this one? |
What it does
This PR sets the language ID of the console text model based on the currently active text editor. To color the REPL, it is required to have a language for the text model.
There is a caveat between VS Code and Theia; VS Code does not allow users to enter input into the REPL when there are no active debug sessions. Theia allows editing the console input. This difference is out of the scope of this PR.
Closes #9261
How to test
Theia:
Screen.Recording.2025-02-06.at.11.11.50.mov
VS Code:
Screen.Recording.2025-02-06.at.11.14.56.mov
Follow-ups
Breaking changes
Attribution
Review checklist
Reminder for reviewers