-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open definition in new window #92
Comments
I'm fairly sure that my approach is pretty dumb and buggy, but seems to be working: (defun racer-find-definition-other-window ()
"Run the racer find-definition command and process the results in other window."
(interactive)
(-if-let (match (--first (s-starts-with? "MATCH" it)
(racer--call-at-point "find-definition")))
(-let [(_name line col file _matchtype _ctx)
(s-split-up-to "," (s-chop-prefix "MATCH " match) 5)]
(if (fboundp 'xref-push-marker-stack)
(xref-push-marker-stack)
(with-no-warnings
(ring-insert find-tag-marker-ring (point-marker))))
(switch-to-buffer-other-window file)
(save-selected-window
(racer--find-file file (string-to-number line) (string-to-number col))))
(error "No definition found"))) I guess there's a better way to do it, extracting the common part or using the optional argument |
Thanks @4lex1v ! It worked just perfect. |
Hi @4lex1v , When I invoke open in new window, it will open the definition in new window. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the awesome package.
Is there any function which will open the definition in new window.
Thank you.
The text was updated successfully, but these errors were encountered: