Skip to content

Use SimpleMonacoEditor for most inline editors #15389

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Apr 3, 2025

What it does

Closes #15218

Adds a new function createSimpleInline to the MonacoEditorProvider that returns an instance of SimpleMonacoEditor that is more customizable than our standard MonacoEditor, allowing customization of both services, which the MonacoEditor also does, and editor contributions, which the MonacoEditor does not, and 'simplicity', which the MonacoEditor also doesn't. Control of contributions is the more direct way to control the presence or absence, rather than behavior, of certain features: remove the inlay hints contribution, and the editor won't have inlay hints, etc.

See discussion on issue re: current design.

How to test

  1. Three current inline editor use cases have been replaced: breakpoint widgets, AI chat input, and AI chat code snippet rendering.
  2. Confirm that each of the three behaves as expected:
  • breakpoint widgets should have code completion for the current context. (But NB that the code completion isn't currently as sophisticated as in the editor itself.
  • AI chat input should have code completion for chat variables, etc.
  • AI chat code snippets should still be colored according to the language in which they're written.

Note that currently, all three editors are instantiated with a full complement of both services and editor contributions - the primary difference in behavior is from setting isSimpleWidget to true; see discussion here.

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

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Apr 3, 2025
@JonasHelming JonasHelming requested review from sdirix and removed request for JonasHelming April 16, 2025 21:42
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Looks good to me! I did not notice any regression.

I tested with the vim extension, and it worked although I had breakpoint editor and chat view open! Nice!

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Apr 25, 2025
@colin-grant-work colin-grant-work force-pushed the feature/scoped-editor-creation branch from 9f934ea to 34dea8a Compare April 25, 2025 22:11
@colin-grant-work colin-grant-work merged commit 17b27d9 into master Apr 25, 2025
9 of 11 checks passed
@colin-grant-work colin-grant-work deleted the feature/scoped-editor-creation branch April 25, 2025 23:44
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Apr 25, 2025
@github-actions github-actions bot added this to the 1.61.0 milestone Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Isolate embedded/standalone Monaco Editors
2 participants