From c8613db13cbdd40bb83dd06eed872a695dd15344 Mon Sep 17 00:00:00 2001 From: petr-tik Date: Mon, 3 May 2021 21:39:49 +0100 Subject: [PATCH] Finish the implementation of related-tests add a review comment about the preview function --- clients/lsp-rust.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/lsp-rust.el b/clients/lsp-rust.el index 429521c16d..a88929c80f 100644 --- a/clients/lsp-rust.el +++ b/clients/lsp-rust.el @@ -973,12 +973,12 @@ Cannot reuse `lsp-rust-analyzer--select-runnable' because the runnables endpoint responds with Runnable[], while relatedTests responds with TestInfo[], which is a wrapper over runnable. Also, this method doesn't set the `lsp-rust-analyzer--last-runnable' variable" (-if-let* ((resp (lsp-rust-analyzer--related-tests)) - (runnables (mapcar (lambda (runnable) (gethash "runnable" runnable)) resp))) - ;; TODO use dolist or some other iterator to extract all of them - ;; since the endpoint returns a list of hash tables that - ;; stores &rust-analyzer:Runnable as a value under key - ;; "runnable" - ;; we need to unpack them first + (runnables (seq-map + (-lambda ((&rust-analyzer:RelatedTests :runnable)) runnable) + resp))) + ;; TODO Is it possible to bind + ;; C-SPC preview similar to what ivy-configured doom has with + ;; ivy-call-and-recenter (lsp--completing-read "Select test: " runnables