-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Use the power of ivy preview (as i got used to it in doom emacs) to overload an interactive runner function with preview functionality.
This PR adds an lsp-rust-analyzer extension to find related tests, which offloads the heavy lifting and user interaction to the helper method mentioned in the issue heaing.
This is the lambda that extracts the label from each runnable and discards everything else, including file and location
https://github.com/emacs-lsp/lsp-mode/pull/2776/files#diff-c8c9a652e719bd23b565da5b6f417aa8c0d55a256e176e0772bfe850a680c37eR982
Instead of discarding it, we could use the location to jump to the start of the related test function definition before running it as a preview. I believe the C-SPC
is bound to ivy-call-and-recenter
in doom-emacs.
Implementation
I am hand wavy about the implementation, but I imagine one could implement some sort of advice to override lsp-rust-analyzer--select-related-test
with an ivy-specific extension that binds C-SPC
(or a non-doom binding) to a preview function.