-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Add #97640: Added options to enable codelens for diff editors #97644
Conversation
@ludokx Please sign the Contributor License Agreement, so I can take a look at this -- see the above comment |
@alexdima done, sorry needed to clarify some things first. What about the VS Code pipeline failure though, seems to be something intermittent and unrelated. How can it be re-run? |
@alexdima quick follow to see if there's anything I can do to get the VS Code check to pass? |
src/vs/monaco.d.ts
Outdated
*/ | ||
originalCodeLens?: boolean; | ||
/** | ||
* Original editor should be have code lens enabled? |
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.
typo: should be "Modified editor" here
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.
oops, copy/paste... :/ good catch, thanks!
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.
no problem
*/ | ||
originalCodeLens?: boolean; | ||
/** | ||
* Original editor should be have code lens enabled? |
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.
same as below
@MehaKaushik thank for catching those typos. The VS Code pipeline failed again but I don't see how this could be related to my change, the default values should have no impact on prior behavior at all. Is there a way to kick off the pipeline again without creating a new commit? |
I believe anyone with write permissions on this repo would be able to run the pipelines for you. |
@alexdima @MehaKaushik anything else I should do for this PR? Thanks |
Thank you! |
This PR fixes #97640.
Description
This PR adds new options
originalCodeLens
andmodifiedCodeLens
to enable CodeLens in the original/modified diff editors (hard coded tofalse
before this PR).How to Test
As described in the monaco-editor documentation,
vscode
andmonaco-
editor must be siblings.Once
vscode
is built withyarn watchd
, go intomonaco-editor
, runnpm run build-website
and thennpm run simpleserver
.Pick an HTML file under
test/playground.generated/
and change to the source below, then open in the browser. I modifiedextending-language-services-codelens-provider-example.html
.Open your browser at:
http://127.0.0.1:8080/monaco-editor/test/playground.generated/extending-language-services-codelens-provider-example.html?editor=src
For
editor
on the right-hand side, selectsrc
to run the code you build from vscode.The code lens shows up in the first line of the modified editor.