1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 23:36:08 +03:00
This commit is contained in:
Tae Won Ha 2020-12-10 21:59:53 +01:00
parent 3166fe0b6c
commit 84c3362238
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -5,14 +5,13 @@
import Cocoa import Cocoa
import MessagePack import MessagePack
import RxPack
import PureLayout import PureLayout
import RxPack
import Tabs import Tabs
extension NvimView { public extension NvimView {
struct TabEntry: Hashable, TabRepresentative {
public struct TabEntry: Hashable, TabRepresentative { public static func == (lhs: TabEntry, rhs: TabEntry) -> Bool { lhs.tabpage == rhs.tabpage }
public static func ==(lhs: TabEntry, rhs: TabEntry) -> Bool { lhs.tabpage == rhs.tabpage }
public var title: String public var title: String
public var isSelected = false public var isSelected = false
@ -20,8 +19,7 @@ extension NvimView {
public var tabpage: RxNeovimApi.Tabpage public var tabpage: RxNeovimApi.Tabpage
} }
public struct Config { struct Config {
var usesCustomTabBar: Bool var usesCustomTabBar: Bool
var useInteractiveZsh: Bool var useInteractiveZsh: Bool
var cwd: URL var cwd: URL
@ -46,13 +44,12 @@ extension NvimView {
} }
} }
public enum Warning { enum Warning {
case cannotCloseLastTab case cannotCloseLastTab
case noWriteSinceLastChange case noWriteSinceLastChange
} }
public enum Event { enum Event {
case neoVimStopped case neoVimStopped
case setTitle(String) case setTitle(String)
case setDirtyStatus(Bool) case setDirtyStatus(Bool)
@ -81,14 +78,12 @@ extension NvimView {
case apiError(msg: String, cause: Swift.Error) case apiError(msg: String, cause: Swift.Error)
} }
public enum Error: Swift.Error { enum Error: Swift.Error {
case nvimLaunch(msg: String, cause: Swift.Error) case nvimLaunch(msg: String, cause: Swift.Error)
case ipc(msg: String, cause: Swift.Error) case ipc(msg: String, cause: Swift.Error)
} }
public struct Theme: CustomStringConvertible { struct Theme: CustomStringConvertible {
public static let `default` = Theme() public static let `default` = Theme()
public var foreground = NSColor.textColor public var foreground = NSColor.textColor
@ -118,10 +113,10 @@ extension NvimView {
} }
public var description: String { public var description: String {
return "NVV.Theme<" + "NVV.Theme<" +
"fg: \(self.foreground.hex), bg: \(self.background.hex), " + "fg: \(self.foreground.hex), bg: \(self.background.hex), " +
"visual-fg: \(self.visualForeground.hex), visual-bg: \(self.visualBackground.hex)" + "visual-fg: \(self.visualForeground.hex), visual-bg: \(self.visualBackground.hex)" +
">" ">"
} }
} }
} }