Variable: treesit-simple-imenu-settings

treesit-simple-imenu-settings is a variable defined in treesit.el.gz.

Value

nil

Documentation

Settings that configure treesit-simple-imenu.

It should be a list of (CATEGORY REGEXP PRED NAME-FN).

CATEGORY is the name of a category, like "Function", "Class", etc. REGEXP should be a regexp matching the type of nodes that belong to CATEGORY. PRED should be either nil or a function that takes a node an the argument. It should return non-nil if the node is a valid node for CATEGORY, or nil if not.

CATEGORY could also be nil. In that case the entries matched by REGEXP and PRED are not grouped under CATEGORY.

NAME-FN should be either nil or a function that takes a defun node and returns the name of that defun node. If NAME-FN is nil, treesit-defun-name is used.

treesit-major-mode-setup automatically sets up Imenu if this variable is non-nil.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
;;; Imenu

(defvar treesit-simple-imenu-settings nil
  "Settings that configure `treesit-simple-imenu'.

It should be a list of (CATEGORY REGEXP PRED NAME-FN).

CATEGORY is the name of a category, like \"Function\", \"Class\",
etc.  REGEXP should be a regexp matching the type of nodes that
belong to CATEGORY.  PRED should be either nil or a function
that takes a node an the argument.  It should return non-nil if
the node is a valid node for CATEGORY, or nil if not.

CATEGORY could also be nil.  In that case the entries matched by
REGEXP and PRED are not grouped under CATEGORY.

NAME-FN should be either nil or a function that takes a defun
node and returns the name of that defun node.  If NAME-FN is nil,
`treesit-defun-name' is used.

`treesit-major-mode-setup' automatically sets up Imenu if this
variable is non-nil.")