From 09017be8485f92a6caafcdbb095a128b537f3695 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sun, 1 May 2022 17:57:03 +0200 Subject: [PATCH] Update neovim --- NvimServer | 2 +- .../RxPack/RxNeovimApi.generated.swift | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/NvimServer b/NvimServer index 6e1c9517..fd3386c8 160000 --- a/NvimServer +++ b/NvimServer @@ -1 +1 @@ -Subproject commit 6e1c95175628d8519ab62367be5617342f43aff0 +Subproject commit fd3386c85450837abbfcbffe3d4246e4a5a28478 diff --git a/RxPack/Sources/RxPack/RxNeovimApi.generated.swift b/RxPack/Sources/RxPack/RxNeovimApi.generated.swift index 90a52e02..3830f720 100644 --- a/RxPack/Sources/RxPack/RxNeovimApi.generated.swift +++ b/RxPack/Sources/RxPack/RxNeovimApi.generated.swift @@ -3772,6 +3772,38 @@ extension RxNeovimApi { .asCompletable() } + public func parseCmd( + str: String, + opts: Dictionary, + errWhenBlocked: Bool = true + ) -> Single> { + + let params: [RxNeovimApi.Value] = [ + .string(str), + .map(opts.mapToDict({ (Value.string($0), $1) })), + ] + + func transform(_ value: Value) throws -> Dictionary { + guard let result = (msgPackDictToSwift(value.dictionaryValue)) else { + throw RxNeovimApi.Error.conversion(type: Dictionary.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,