1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-09-11 17:15:34 +03:00

Update neovim

This commit is contained in:
Tae Won Ha 2022-05-14 19:02:16 +02:00
parent 09017be848
commit abda22eb3a
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 65 additions and 33 deletions

@ -1 +1 @@
Subproject commit fd3386c85450837abbfcbffe3d4246e4a5a28478
Subproject commit e781779051049cb07b8a95e19dfeb69ec25ef4f9

View File

@ -3772,38 +3772,6 @@ extension RxNeovimApi {
.asCompletable()
}
public func parseCmd(
str: String,
opts: Dictionary<String, RxNeovimApi.Value>,
errWhenBlocked: Bool = true
) -> Single<Dictionary<String, RxNeovimApi.Value>> {
let params: [RxNeovimApi.Value] = [
.string(str),
.map(opts.mapToDict({ (Value.string($0), $1) })),
]
func transform(_ value: Value) throws -> Dictionary<String, RxNeovimApi.Value> {
guard let result = (msgPackDictToSwift(value.dictionaryValue)) else {
throw RxNeovimApi.Error.conversion(type: Dictionary<String, RxNeovimApi.Value>.self)
}
return result
}
if errWhenBlocked {
return self
.checkBlocked(
self.rpc(method: "nvim_parse_cmd", params: params, expectsReturnValue: true)
)
.map(transform)
}
return self
.rpc(method: "nvim_parse_cmd", params: params, expectsReturnValue: true)
.map(transform)
}
public func exec(
src: String,
output: Bool,
@ -3988,6 +3956,70 @@ extension RxNeovimApi {
.map(transform)
}
public func parseCmd(
str: String,
opts: Dictionary<String, RxNeovimApi.Value>,
errWhenBlocked: Bool = true
) -> Single<Dictionary<String, RxNeovimApi.Value>> {
let params: [RxNeovimApi.Value] = [
.string(str),
.map(opts.mapToDict({ (Value.string($0), $1) })),
]
func transform(_ value: Value) throws -> Dictionary<String, RxNeovimApi.Value> {
guard let result = (msgPackDictToSwift(value.dictionaryValue)) else {
throw RxNeovimApi.Error.conversion(type: Dictionary<String, RxNeovimApi.Value>.self)
}
return result
}
if errWhenBlocked {
return self
.checkBlocked(
self.rpc(method: "nvim_parse_cmd", params: params, expectsReturnValue: true)
)
.map(transform)
}
return self
.rpc(method: "nvim_parse_cmd", params: params, expectsReturnValue: true)
.map(transform)
}
public func cmd(
cmd: Dictionary<String, RxNeovimApi.Value>,
opts: Dictionary<String, RxNeovimApi.Value>,
errWhenBlocked: Bool = true
) -> Single<String> {
let params: [RxNeovimApi.Value] = [
.map(cmd.mapToDict({ (Value.string($0), $1) })),
.map(opts.mapToDict({ (Value.string($0), $1) })),
]
func transform(_ value: Value) throws -> String {
guard let result = (value.stringValue) else {
throw RxNeovimApi.Error.conversion(type: String.self)
}
return result
}
if errWhenBlocked {
return self
.checkBlocked(
self.rpc(method: "nvim_cmd", params: params, expectsReturnValue: true)
)
.map(transform)
}
return self
.rpc(method: "nvim_cmd", params: params, expectsReturnValue: true)
.map(transform)
}
public func openWin(
buffer: RxNeovimApi.Buffer,
enter: Bool,