Skip to content

Conversation

@jameskerr
Copy link
Contributor

@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
Contributor 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
Contributor 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
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

4 participants