-
Notifications
You must be signed in to change notification settings - Fork 3
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 Editor Syntax Highlighting #104
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # Sources/App/Views/Common/Editor.swift # Sources/App/Views/Sections/Editor/Detail/EditorDetail.swift # project.yml
…hub.com/wise-emotions/mocka into experimental/editor-syntax-highlighting # Conflicts: # Sources/App/Views/Common/MockaSourceCodeEditor.swift
Sources/App/Resources/Assets.xcassets/Keyword.colorset/Contents.json
Outdated
Show resolved
Hide resolved
Sources/App/Resources/Assets.xcassets/Number.colorset/Contents.json
Outdated
Show resolved
Hide resolved
Sources/App/Resources/Assets.xcassets/String.colorset/Contents.json
Outdated
Show resolved
Hide resolved
.frame(maxWidth: .infinity, alignment: .leading) | ||
.font(.headline) | ||
.foregroundColor(Color.latte) | ||
VStack(spacing: 16) { |
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.
Why 16
? Does this component look different from the previous one?
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.
previously it was 10, I just raised it to be a multiple of 4.
import SwiftUI | ||
|
||
/// A source code editor with custom theme. | ||
struct MockaSourceCodeTextEditor: NSViewRepresentable { |
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.
struct MockaSourceCodeTextEditor: NSViewRepresentable { | |
struct SourceCodeTextEditor: NSViewRepresentable { |
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.
SourceCodeTextEditor
is the name of the View component provided by Sourceful
fieldsSection | ||
|
||
headersSection |
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.
Why did you create these var
s?
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.
to clean up the body a little bit, I found it a bit hard to read. we can remove them if you prefer
@@ -21,6 +21,10 @@ packages: | |||
Vapor: | |||
url: https://github.com/vapor/vapor | |||
from: 4.0.0 | |||
Sourceful: | |||
url: https://github.com/twostraws/Sourceful | |||
branch: main |
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.
There are no releases available?
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.
releases are way behind main
Description
This PR adds syntax highlighting to the JSON editor.
Type of Change
Checklist:
Screenshots