You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
https://github.com/emacs-lsp/lsp-mode/pull/2776/files#diff-c8c9a652e719bd23b565da5b6f417aa8c0d55a256e176e0772bfe850a680c37eR975-R982
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 toivy-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 bindsC-SPC
(or a non-doom binding) to a preview function.The text was updated successfully, but these errors were encountered: