Closed nbfalcon closed 3 years ago
Also, can we make that function public? It could be useful as an :after advice within find-function
, find-variable
, ... because then they could be made to jump to the function directly.
Similar support for rust
will be needed, too, but I don't think I can implement that (I don't have any rust plugins).
Here is a tested doom
defadvice!
for what I've just proposed:
(defadvice! my/find-function-recenter (sym &rest _)
:after #'find-function-do-it
(require 'elisp-def)
(elisp-def--show-occurrence sym))
Rust doesn't seem to expose the position? At least find-function didn't work with it, so supporting it probably isn't needed. This PR is ready.
Looks good, thank you! :)
elisp-def
now doesn't error and properly blinks and recenters when jumping to functions defined in C or C++ code.