mirror of
https://github.com/qvacua/vimr.git
synced 2024-09-11 17:15:34 +03:00
Compare commits
4 Commits
5193a32cdb
...
3b8fbe973b
Author | SHA1 | Date | |
---|---|---|---|
|
3b8fbe973b | ||
|
8118e9c311 | ||
|
bfab09e3b7 | ||
|
d56803fafb |
2
.github/workflows/build-universal-neovim.yml
vendored
2
.github/workflows/build-universal-neovim.yml
vendored
@ -76,5 +76,5 @@ jobs:
|
|||||||
gh release create $TAG_NAME \
|
gh release create $TAG_NAME \
|
||||||
--prerelease \
|
--prerelease \
|
||||||
--title "Universal ${TAG_NAME}" \
|
--title "Universal ${TAG_NAME}" \
|
||||||
--notes "Neovim universal build with `libintl`" \
|
--notes "Neovim universal build with `libintl`, not signed." \
|
||||||
--target $GITHUB_SHA nvim-macos-x86_64.tar.gz nvim-macos-arm64.tar.gz nvim-macos-universal.tar.bz
|
--target $GITHUB_SHA nvim-macos-x86_64.tar.gz nvim-macos-arm64.tar.gz nvim-macos-universal.tar.bz
|
||||||
|
@ -54,10 +54,10 @@ public extension NvimView {
|
|||||||
|
|
||||||
let mousescroll: String
|
let mousescroll: String
|
||||||
if event.hasPreciseScrollingDeltas { // trackpad
|
if event.hasPreciseScrollingDeltas { // trackpad
|
||||||
let (absDeltaX, absDeltaY) = (abs(deltaX), abs(deltaY))
|
let (absDeltaX, absDeltaY) = (abs(deltaX), abs(deltaY))
|
||||||
mousescroll = "ver:\(absDeltaY),hor:\(absDeltaX)"
|
mousescroll = "ver:\(absDeltaY),hor:\(absDeltaX)"
|
||||||
} else {
|
} else {
|
||||||
mousescroll = ""
|
mousescroll = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.api.nvimExecLua(code: """
|
return self.api.nvimExecLua(code: """
|
||||||
@ -81,8 +81,8 @@ public extension NvimView {
|
|||||||
end)
|
end)
|
||||||
""", args: [MessagePackValue(mousescroll), MessagePackValue(vimInput)])
|
""", args: [MessagePackValue(mousescroll), MessagePackValue(vimInput)])
|
||||||
.subscribe(onFailure: { [weak self] error in
|
.subscribe(onFailure: { [weak self] error in
|
||||||
self?.log.error("Error in \(#function): \(error)")
|
self?.log.error("Error in \(#function): \(error)")
|
||||||
})
|
})
|
||||||
.disposed(by: self.disposeBag)
|
.disposed(by: self.disposeBag)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,18 +220,18 @@ public extension NvimView {
|
|||||||
|
|
||||||
let resultX: String
|
let resultX: String
|
||||||
if deltaX == 0 {
|
if deltaX == 0 {
|
||||||
resultX = ""
|
resultX = ""
|
||||||
} else {
|
} else {
|
||||||
let wheel = (deltaX < 0) ? "ScrollWheelRight" : "ScrollWheelLeft"
|
let wheel = (deltaX < 0) ? "ScrollWheelRight" : "ScrollWheelLeft"
|
||||||
resultX = self.wrapNamedKeys("\(vimModifiers)\(wheel)") + vimMouseLocation
|
resultX = self.wrapNamedKeys("\(vimModifiers)\(wheel)") + vimMouseLocation
|
||||||
}
|
}
|
||||||
|
|
||||||
let resultY: String
|
let resultY: String
|
||||||
if deltaY == 0 {
|
if deltaY == 0 {
|
||||||
resultY = ""
|
resultY = ""
|
||||||
} else {
|
} else {
|
||||||
let wheel = (deltaY < 0) ? "ScrollWheelDown" : "ScrollWheelUp"
|
let wheel = (deltaY < 0) ? "ScrollWheelDown" : "ScrollWheelUp"
|
||||||
resultY = self.wrapNamedKeys("\(vimModifiers)\(wheel)") + vimMouseLocation
|
resultY = self.wrapNamedKeys("\(vimModifiers)\(wheel)") + vimMouseLocation
|
||||||
}
|
}
|
||||||
|
|
||||||
return "\(resultX)\(resultY)"
|
return "\(resultX)\(resultY)"
|
||||||
|
@ -109,7 +109,7 @@ extension NvimView {
|
|||||||
throw RxNeovimApi.Error.exception(message: "Incompatible neovim version.")
|
throw RxNeovimApi.Error.exception(message: "Incompatible neovim version.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// swiftformat:disable all
|
// swiftformat:disable all
|
||||||
let vimscript = """
|
let vimscript = """
|
||||||
function! GetHiColor(hlID, component)
|
function! GetHiColor(hlID, component)
|
||||||
let color = synIDattr(synIDtrans(hlID(a:hlID)), a:component)
|
let color = synIDattr(synIDtrans(hlID(a:hlID)), a:component)
|
||||||
|
@ -94,7 +94,8 @@ public extension NvimView {
|
|||||||
public var foreground = NSColor.textColor
|
public var foreground = NSColor.textColor
|
||||||
public var background = NSColor.textBackgroundColor
|
public var background = NSColor.textBackgroundColor
|
||||||
|
|
||||||
public var visualForeground: NSColor = NSColor(named: NSColor.Name("controlAccentColor")) ?? .selectedMenuItemTextColor
|
public var visualForeground: NSColor =
|
||||||
|
.init(named: NSColor.Name("controlAccentColor")) ?? .selectedMenuItemTextColor
|
||||||
// NSColor.selectedMenuItemTextColor
|
// NSColor.selectedMenuItemTextColor
|
||||||
// NSColor.selectedMenuItemColor is deprecated. The doc says that
|
// NSColor.selectedMenuItemColor is deprecated. The doc says that
|
||||||
// NSVisualEffectView.Material.selection should be used instead, but I don't know how to get
|
// NSVisualEffectView.Material.selection should be used instead, but I don't know how to get
|
||||||
@ -135,9 +136,10 @@ public extension NvimView {
|
|||||||
self.tabBackground = values[7] < 0 ? Theme.default.tabBackground : color(values[7])
|
self.tabBackground = values[7] < 0 ? Theme.default.tabBackground : color(values[7])
|
||||||
self.tabForeground = values[8] < 0 ? Theme.default.tabForeground : color(values[8])
|
self.tabForeground = values[8] < 0 ? Theme.default.tabForeground : color(values[8])
|
||||||
|
|
||||||
self.selectedTabBackground = values[9] < 0 ? Theme.default.selectedTabBackground : color(values[9])
|
self.selectedTabBackground = values[9] < 0 ? Theme.default
|
||||||
self.selectedTabForeground = values[10] < 0 ? Theme.default.selectedTabForeground : color(values[10])
|
.selectedTabBackground : color(values[9])
|
||||||
|
self.selectedTabForeground = values[10] < 0 ? Theme.default
|
||||||
|
.selectedTabForeground : color(values[10])
|
||||||
}
|
}
|
||||||
|
|
||||||
public var description: String {
|
public var description: String {
|
||||||
|
@ -113,8 +113,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/sparkle-project/Sparkle",
|
"location" : "https://github.com/sparkle-project/Sparkle",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "41847a58cdef7506b257591fcca6f9495df591d4",
|
"revision" : "b456fd404954a9e13f55aa0c88cd5a40b8399638",
|
||||||
"version" : "2.6.2"
|
"version" : "2.6.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -122,8 +122,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apple/swift-collections.git",
|
"location" : "https://github.com/apple/swift-collections.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb",
|
"revision" : "ee97538f5b81ae89698fd95938896dec5217b148",
|
||||||
"version" : "1.1.0"
|
"version" : "1.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1393,7 +1393,7 @@
|
|||||||
repositoryURL = "https://github.com/sparkle-project/Sparkle";
|
repositoryURL = "https://github.com/sparkle-project/Sparkle";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 2.6.2;
|
version = 2.6.3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
4BADD55C283ABD0200C6B16D /* XCRemoteSwiftPackageReference "swift-collections" */ = {
|
4BADD55C283ABD0200C6B16D /* XCRemoteSwiftPackageReference "swift-collections" */ = {
|
||||||
@ -1401,7 +1401,7 @@
|
|||||||
repositoryURL = "https://github.com/apple/swift-collections.git";
|
repositoryURL = "https://github.com/apple/swift-collections.git";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = upToNextMajorVersion;
|
kind = upToNextMajorVersion;
|
||||||
minimumVersion = 1.1.0;
|
minimumVersion = 1.1.1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
4BD5655124E8014100D52809 /* XCRemoteSwiftPackageReference "swifter" */ = {
|
4BD5655124E8014100D52809 /* XCRemoteSwiftPackageReference "swifter" */ = {
|
||||||
|
@ -356,7 +356,6 @@ final class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDe
|
|||||||
case 1: .withFontSmoothing
|
case 1: .withFontSmoothing
|
||||||
case 2: .noFontSmoothing
|
case 2: .noFontSmoothing
|
||||||
case 3: .noAntiAliasing
|
case 3: .noAntiAliasing
|
||||||
|
|
||||||
default: .systemSetting
|
default: .systemSetting
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,6 @@ final class HttpServerMiddleware {
|
|||||||
case .bufferWritten: fallthrough
|
case .bufferWritten: fallthrough
|
||||||
case .setTheme:
|
case .setTheme:
|
||||||
break
|
break
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,6 @@ final class MarkdownPreviewMiddleware {
|
|||||||
case .bufferWritten: fallthrough
|
case .bufferWritten: fallthrough
|
||||||
case .setTheme:
|
case .setTheme:
|
||||||
self.generator.apply(result.state, uuid: uuidAction.uuid)
|
self.generator.apply(result.state, uuid: uuidAction.uuid)
|
||||||
|
|
||||||
default: return result
|
default: return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ struct Theme: CustomStringConvertible {
|
|||||||
var cssCodeColor = NSColor(hex: "24292e")!
|
var cssCodeColor = NSColor(hex: "24292e")!
|
||||||
var cssCodeBackgroundColor = NSColor(hex: "1b1f23")!
|
var cssCodeBackgroundColor = NSColor(hex: "1b1f23")!
|
||||||
|
|
||||||
public var description: String {
|
public var description: String {
|
||||||
"Theme<" +
|
"Theme<" +
|
||||||
"fg: \(self.foreground.hex), bg: \(self.background.hex), " +
|
"fg: \(self.foreground.hex), bg: \(self.background.hex), " +
|
||||||
"hl-fg: \(self.highlightForeground.hex), hl-bg: \(self.highlightBackground.hex), " +
|
"hl-fg: \(self.highlightForeground.hex), hl-bg: \(self.highlightBackground.hex), " +
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
# Next
|
# Next
|
||||||
|
|
||||||
|
* Dependencies updates:
|
||||||
|
- sparkle-project/Sparkle@2.7.3
|
||||||
|
- apple/swift-collections@1.1.1
|
||||||
|
|
||||||
|
# v0.47.3-20240616.090032
|
||||||
|
|
||||||
* GH-1072: Match the tab colors 1:1 with Neovim's `colorscheme`; thanks @s-daveb for the PR!
|
* GH-1072: Match the tab colors 1:1 with Neovim's `colorscheme`; thanks @s-daveb for the PR!
|
||||||
* GH-1073: Scroll the window content instead of moving the cursor; thanks @shanesmith for the PR!
|
* GH-1073: Scroll the window content instead of moving the cursor; thanks @shanesmith for the PR!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user