Variable: treesit-aggregated-simple-imenu-settings

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

Value

nil

Documentation

Settings that configure treesit-simple-imenu for multi-language modes.

The value should be an alist of (LANG . SETTINGS), where LANG is a language symbol, and SETTINGS has the same form as treesit-simple-imenu-settings.

When both this variable and treesit-simple-imenu-settings are non-nil, this variable takes priority.

View in manual

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
;; `treesit-simple-imenu-settings' doesn't support multiple languages,
;; and we need to add multi-lang support for Imenu.  One option is to
;; extend treesit-simple-imenu-settings to specify language, either by
;; making it optionally an alist (just like
;; `treesit-aggregated-simple-imenu-settings'), or add a fifth element
;; to each setting.  But either way makes borrowing Imenu settings from
;; other modes difficult: with the alist approach, you'd need to check
;; whether other mode uses a plain list or an alist; with the fifth
;; element approach, again, you need to check if each setting has the
;; fifth element, and add it if not.
;;
;; OTOH, with `treesit-aggregated-simple-imenu-settings', borrowing
;; Imenu settings is easy: if `treesit-aggregated-simple-imenu-settings'
;; is non-nil, copy everything over; if `treesit-simple-imenu-settings'
;; is non-nil, copy the settings and put them under a language symbol.
(defvar treesit-aggregated-simple-imenu-settings nil
  "Settings that configure `treesit-simple-imenu' for multi-language modes.

The value should be an alist of (LANG . SETTINGS), where LANG is a
language symbol, and SETTINGS has the same form as
`treesit-simple-imenu-settings'.

When both this variable and `treesit-simple-imenu-settings' are non-nil,
this variable takes priority.")