Closed yonomitt closed 1 year ago
Love it! 💜
For anyone trying out this branch, remember to update your theme! code: .xcodeDark,
I think I added a code theme to the default .dark
, but I didn't touch any of the other themes.
This definitely needs to be documented at some point 😀
@yonomitt 'CodeTheme' initializer is inaccessible due to 'internal' protection level
🙈
Could you kindly add a public member-wise initializer?
public init(font: SwiftUI.Font, plainTextColor: SwiftUI.Color, backgroundColor: SwiftUI.Color, tokenColors: [TokenType : SwiftUI.Color]) {
self.font = font
self.plainTextColor = plainTextColor
self.backgroundColor = backgroundColor
self.tokenColors = tokenColors
}
Just presented a talk using this code and it went great! +1 to merge
@FullQueueDeveloper Did you really give a talk with DeckUI?! I would love to link to it from the README if you would like to share it in any form 😊😊😊😊😊😊😊
@yonomitt
'CodeTheme' initializer is inaccessible due to 'internal' protection level
🙈Could you kindly add a public member-wise initializer?
public init(font: SwiftUI.Font, plainTextColor: SwiftUI.Color, backgroundColor: SwiftUI.Color, tokenColors: [TokenType : SwiftUI.Color]) { self.font = font self.plainTextColor = plainTextColor self.backgroundColor = backgroundColor self.tokenColors = tokenColors }
Good point! I'll add this shortly
@FullQueueDeveloper Did you really give a talk with DeckUI?! I would love to link to it from the README if you would like to share it in any form 😊😊😊😊😊😊😊
@joshdholtz yes I did! I'll ping you when the meetup organizers post the recording 😍 And I would be honored for a link in your README ✨
@FullQueueDeveloper Did you really give a talk with DeckUI?! I would love to link to it from the README if you would like to share it in any form 😊😊😊😊😊😊😊
Yes, would love a link in your README!
The video is up! https://www.youtube.com/watch?v=SxozYjWMhgU
Also, I published my deck as well! https://github.com/FullQueueDeveloper/Deck-2022-09-13
This PR adds support for syntax highlighting for Swift code. There is a new parameter on
Code.init()
calledlanguage
. This is an enum, which can currently be set to.swift
and.none
for no syntax highlighting.This closes issue #8
I'm not 100% happy with the API, as the language parameter is currently at the end of the parameter list for
Code.init()
, which if you have a large string of code before that, it can be kind of "lost".Additionally, I think there are two different functions with similar names:
enableHighlight
, which allows you to select single lines of code to go through and syntax highlighting, which is to make colorful code. This may be something that should be looked into.I'm 100% open to suggestions to either of these two deficiencies (in my view). If no one else thinks they're problematic, I'm happy to go with the group on this one.
https://user-images.githubusercontent.com/8521453/189717086-c5c0d26d-b0b0-4a8f-aa65-14e5438d9373.mov