Function: xref-backend-xref-kinds

xref-backend-xref-kinds is a byte-compiled function defined in xref.el.gz.

Signature

(xref-backend-xref-kinds BACKEND)

Documentation

Return list of descriptors for xref kinds supported by BACKEND.

Each descriptor is a plist with properties :kind, :name and :key where the kind is a symbol value the backend will be able to recognize as specifying one of the xref types that the backend supports, the name is a string suitable for prompts (e.g., in xref-read-identifier) and errors shown to the user, and the key is a unique character to be used to select one of the kinds when prompted to select a kind. Optionally, it can also include :prompt-format which decides how the prompt will look, defaulting to "Find %s". The %s specifier gets replaced with the kind's name.

Having a kind in this list means that the backend can try to find such xrefs in the current and related buffers, with no guarantee of success. These locations might or might not be included in the results of xref-backend-definitions or xref-backend-references.

Implementations

(xref-backend-xref-kinds (BACKEND (eql 'etags))) in `etags.el'.

Return list of descriptors of xref kinds supported by the etags backend. This is the implementation of the `kinds' method for the `etags' backend. It supports most of the taggable files that the `etags' utility knows about.

(xref-backend-xref-kinds (BACKEND (eql eglot))) in `eglot.el'.

Undocumented

(xref-backend-xref-kinds BACKEND) in `xref.el'.

Undocumented

(xref-backend-xref-kinds (BACKEND (eql 'elisp))) in `elisp-mode.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/xref.el.gz
(cl-defgeneric xref-backend-xref-kinds (backend)
  "Return list of descriptors for xref kinds supported by BACKEND.

Each descriptor is a plist with properties `:kind', `:name' and `:key'
where the kind is a symbol value the backend will be able to recognize
as specifying one of the xref types that the backend supports, the name
is a string suitable for prompts (e.g., in `xref-read-identifier') and
errors shown to the user, and the key is a unique character to be used
to select one of the kinds when prompted to select a kind.
Optionally, it can also include `:prompt-format' which decides how the
prompt will look, defaulting to \"Find %s\".  The %s specifier gets
replaced with the kind's name.

Having a kind in this list means that the backend can try to find such
xrefs in the current and related buffers, with no guarantee of success.
These locations might or might not be included in the results of
`xref-backend-definitions' or `xref-backend-references'."
  (if backend
      (user-error "Xref kinds not supported by the backend")
    (xref--no-backend-available)))