Skip to content

Latest commit

 

History

History
138 lines (129 loc) · 5.25 KB

examples.org

File metadata and controls

138 lines (129 loc) · 5.25 KB

Smart Jump Examples

C/C++

(smart-jump-register :modes '(c-mode c++-mode)
                     :jump-fn 'ymcd-goto
                     :refs-fn 'ycmd-goto-references
                     :heuristic 'point
                     :async 500)

(smart-jump-register :modes '(c-mode c++-mode)
                     :jump-fn 'rtags-find-symbol-at-point
                     :pop-fn 'rtags-location-stack-back
                     :refs-fn 'rtags-find-all-references-at-point
                     :should-jump (lambda ()
                                    (and
                                     (fboundp 'rtags-executable-find)
                                     (rtags-executable-find "rc")
                                     (rtags-is-indexed)))
                     :heuristic 'point
                     :async 500)

(smart-jump-register :modes '(c-mode c++-mode)
                     :jump-fn 'ggtags-find-tag-dwim
                     :pop-fn 'ggtags-prev-mark
                     :refs-fn 'ggtags-find-reference
                     :should-jump t
                     :heuristic 'point
                     :async 500)

Clojure

(smart-jump-register :modes '(clojure-mode cider-mode cider-repl-mode)
                     :jump-fn 'cider-find-var
                     :pop-fn 'cider-pop-back
                     :refs-fn 'cljr-find-usages
                     :should-jump 'cider-connected-p
                     :heuristic 'point
                     :async 500)

Common Lisp

(smart-jump-register :modes '(slime-mode slime-popup-buffer-mode)
                     :jump-fn 'slime-edit-definition
                     :pop-fn 'slime-pop-find-definition-stack
                     :refs-fn 'slime-who-references
                     :should-jump 'slime-current-connection
                     :heuristic 'point
                     :async 700)

CSharp

(smart-jump-register :modes 'csharp-mode
                     :jump-fn 'omnisharp-go-to-definition
                     :pop-fn 'pop-tag-mark
                     :refs-fn 'omnisharp-find-usages
                     :should-jump t
                     :heuristic 'point
                     :async 500)

Elisp

(smart-jump-register :modes '(emacs-lisp-mode lisp-interaction-mode)
                     :jump-fn 'elisp-slime-nav-find-elisp-thing-at-point
                     :pop-fn 'pop-tag-mark
                     :should-jump t
                     :heuristic 'error
                     :async nil)

Elixir

(smart-jump-register :modes '(alchemist-mode)
                     :jump-fn 'alchemist-goto-definition-at-point
                     :pop-fn 'alchemist-goto-jump-back
                     :should-jump t
                     :heuristic 'point
                     :async 500)

Java

(smart-jump-register :modes 'java-mode
                     :jump-fn 'ggtags-find-tag-dwim
                     :pop-fn 'ggtags-prev-mark
                     :refs-fn 'ggtags-find-reference
                     :should-jump t
                     :heuristic 'point
                     :async 700
                     :order 2)

(smart-jump-register :modes 'java-mode
                     :jump-fn 'meghanada-jump-declaration
                     :pop-fn 'meghanada-back-jump
                     :refs-fn 'meghanada-reference
                     :should-jump t
                     :heuristic 'point
                     :async 700
                     :order 1)

Javascript

(smart-jump-register :modes '(js2-mode rjsx-mode))

Objective-C

(smart-jump-register :modes '(objc-mode)
                     :jump-fn 'ymcd-goto
                     :refs-fn 'ycmd-goto-references
                     :heuristic 'point
                     :async 500)

(smart-jump-register :modes '(objc-mode)
                     :jump-fn 'etags-select-find-tag-at-point
                     :heuristic 'point
                     :async t)

Python

(smart-jump-register :modes 'anaconda-mode
                     :jump-fn 'anaconda-mode-find-definitions
                     :pop-fn 'anaconda-mode-go-back
                     :refs-fn 'anaconda-mode-find-references
                     :heuristic 'point
                     :async 600)

Typescript

(smart-jump-register :modes 'tide-mode
                     :jump-fn 'tide-jump-to-definition
                     :pop-fn 'tide-jump-back
                     :refs-fn 'tide-references
                     :should-jump t
                     :heuristic 'point
                     :async t)