mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-18 19:21:39 +03:00
Update neovim
This commit is contained in:
parent
61dc2d759a
commit
09017be848
@ -1 +1 @@
|
|||||||
Subproject commit 6e1c95175628d8519ab62367be5617342f43aff0
|
Subproject commit fd3386c85450837abbfcbffe3d4246e4a5a28478
|
@ -3772,6 +3772,38 @@ extension RxNeovimApi {
|
|||||||
.asCompletable()
|
.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(
|
public func exec(
|
||||||
src: String,
|
src: String,
|
||||||
output: Bool,
|
output: Bool,
|
||||||
|
Loading…
Reference in New Issue
Block a user