-
Notifications
You must be signed in to change notification settings - Fork 15
Swift 4 version #4
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
Conversation
|
Thanks a lot @Mort3m ! This will be merged as soon as the GM Seed comes out. For the meantime you can fix the remaining issues with indentation. As stated in the |
alehed
left a comment
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.
I can't see if the whitespace diff is from using tabs instead of spaces or just indenting with one space less than usual.
SyntaxKit/AttributedParser.swift
Outdated
|
|
||
| open func attributedString(for string: String, base: Attributes? = nil) -> NSAttributedString { | ||
| let output = NSMutableAttributedString(string: string, attributes: base) | ||
| let output = NSMutableAttributedString(string: string, attributes: base) |
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.
This should be 8 spaces instead of seven.
SyntaxKit/Parser.swift
Outdated
| continue | ||
| } | ||
| let range = result.rangeAt(Int(index)) | ||
| let range = result.range(at: Int(index)) |
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 here (missing space).
SyntaxKit/Theme.swift
Outdated
|
|
||
| if let value = setting.removeValue(forKey: "foreground") as? String { | ||
| setting[NSForegroundColorAttributeName] = Color(hex: value) | ||
| if let value = setting.removeValue(forKey: NSAttributedStringKey(rawValue: "foreground")) as? String { |
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.
Also a missing space
SyntaxKit/Theme.swift
Outdated
|
|
||
| public var backgroundColor: Color { | ||
| return attributes[Language.globalScope]?[NSBackgroundColorAttributeName] as? Color ?? Color.white | ||
| return attributes[Language.globalScope]?[NSAttributedStringKey.backgroundColor] as? Color ?? Color.white |
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.
Another missing space
SyntaxKit/Theme.swift
Outdated
|
|
||
| public var foregroundColor: Color { | ||
| return attributes[Language.globalScope]?[NSForegroundColorAttributeName] as? Color ?? Color.black | ||
| return attributes[Language.globalScope]?[NSAttributedStringKey.foregroundColor] as? Color ?? Color.black |
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.
Here too.
SyntaxKit/Theme.swift
Outdated
|
|
||
| if let value = setting.removeValue(forKey: "background") as? String { | ||
| setting[NSBackgroundColorAttributeName] = Color(hex: value) | ||
| if let value = setting.removeValue(forKey: NSAttributedStringKey(rawValue: "background")) as? String { |
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.
Last one
|
Alright @alehed, I will take care of it! |
alehed
left a comment
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.
Two more lines still contain tabs (53 and 57).
|
Great, thanks! As mentioned, this will be merged as soon as the GM Seed is released by Apple, which is probably going to happen sometime in September. Unfortunately, there is currently no editor-config plugin that works in Xcode… |
|
@Mort3m Thanks a lot for the contribution! 👍 |
Migrated to Swift 4 for a new project.
Thought it might be useful some others as well.
Thanks a lot for you contributions & fixes @alehed!