Skip to content
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

Conversation

kittaakos
Copy link
Contributor

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

  1. Set the REPL input containing keywords from multiple languages.
  2. Open a few files from multiple languages.
  3. When you change the active editor, the coloring of the REPL text changes. It's like in VS Code.

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

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

This is required to color the repl input based on the currently active
text editor.

Closes eclipse-theia#9261
Copy link
Member

@msujew msujew left a 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.

@msujew msujew added debug issues that related to debug functionality ui/ux issues related to user interface / user experience labels Feb 18, 2025
@kittaakos kittaakos requested a review from msujew February 19, 2025 08:06
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@tsmaeder
Copy link
Contributor

@kittaakos @msujew should we merge this one?

@msujew msujew merged commit cb84f23 into eclipse-theia:master Feb 26, 2025
10 of 11 checks passed
@github-actions github-actions bot added this to the 1.59.0 milestone Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality ui/ux issues related to user interface / user experience
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[debug] The debug console does not support expression coloring based on the type
3 participants