Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 2.04 KB

README.md

File metadata and controls

60 lines (45 loc) · 2.04 KB

ivy-xref - select from xref candidates with ivy

License GPL 3 MELPA Build Status

Use Ivy as the interface to select from xref candidates.

Installation

MELPA

The preferred way to install ivy-xref is via MELPA - then you can just M-x package-install RET ivy-xref RET

To enable then simply add the following to your init file:

(require 'ivy-xref)
;; xref initialization is different in Emacs 27 - there are two different
;; variables which can be set rather than just one
(when (>= emacs-major-version 27)
  (setq xref-show-definitions-function #'ivy-xref-show-defs))
;; Necessary in Emacs <27. In Emacs 27 it will affect all xref-based
;; commands other than xref-find-definitions (e.g. project-find-regexp)
;; as well
(setq xref-show-xrefs-function #'ivy-xref-show-xrefs)

We recommend to use use-package to make this automatic:

(use-package ivy-xref
  :ensure t
  :init
  ;; xref initialization is different in Emacs 27 - there are two different
  ;; variables which can be set rather than just one
  (when (>= emacs-major-version 27)
    (setq xref-show-definitions-function #'ivy-xref-show-defs))
  ;; Necessary in Emacs <27. In Emacs 27 it will affect all xref-based
  ;; commands other than xref-find-definitions (e.g. project-find-regexp)
  ;; as well
  (setq xref-show-xrefs-function #'ivy-xref-show-xrefs))

Manual installation

If you would like to install the package manually, download or clone it and place within Emacs' load-path, then enable as above.

License

Copyright © 2017 Alex Murray

Distributed under GNU GPL, version 3.