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

Monaco Editor In Zui #2824

Merged
merged 8 commits into from
Aug 1, 2023
Merged

Monaco Editor In Zui #2824

merged 8 commits into from
Aug 1, 2023

Conversation

jameskerr
Copy link
Member

@jameskerr jameskerr commented Jul 27, 2023

Replaced code mirror with Monaco. This PR includes some minimal syntax highlighting.

CleanShot.2023-07-27.at.16.52.05.mp4

Closes #2812
Closes #2762

@jameskerr jameskerr changed the base branch from main to monorepo July 27, 2023 23:50
@jameskerr jameskerr requested a review from philrz July 27, 2023 23:57
@philrz philrz requested a review from nwt July 28, 2023 17:51
Comment on lines +4 to +23
"uint8",
"uint16",
"uint32",
"uint64",
"int8",
"int16",
"int32",
"int64",
"float16",
"float32",
"float64",
"bool",
"string",
"duration",
"time",
"bytes",
"ip",
"net",
"type",
"null",
Copy link
Member

Choose a reason for hiding this comment

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

The Zed types in zed-js (e.g, TypeOfUint8) have a name property. Would it make sense to use those name properties here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that could work.

const isEnterKey = e.key === "Enter"
const isModKey = e.shiftKey || cmdOrCtrl(e)
if (isEnterKey) {
if ((runOnEnter && !isModKey) || (!runOnEnter && isModKey)) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe simplify this?

Suggested change
if ((runOnEnter && !isModKey) || (!runOnEnter && isModKey)) {
if (runOnEnter !== isModKey) {

Copy link
Member Author

Choose a reason for hiding this comment

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

That's too smart for me. 😅

Base automatically changed from monorepo to main July 29, 2023 03:31
@jameskerr jameskerr merged commit 8796806 into main Aug 1, 2023
3 checks passed
@jameskerr jameskerr deleted the monaco-editor branch August 1, 2023 20:51
@philrz philrz mentioned this pull request Aug 8, 2023
@philrz philrz mentioned this pull request Nov 1, 2023
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.

Monospace font Zed syntax highlighting in editor
3 participants