An interactive sidebar for navigating leaf.el configurations in your Emacs init file.
Overview
leaf-tree provides a tree-view sidebar that displays all your leaf declarations, making it easy to navigate and manage package configurations in large init files. Built on top of imenu-list, it offers a familiar interface for browsing hierarchical structures.
Requirements
- Emacs 25.1 or later
- imenu-list 0.8 or later
Installation
Using leaf.el
(leaf leaf-tree :ensure t :custom ((imenu-list-size . 30) (imenu-list-position . 'left)))
Using package.el
(package-install 'leaf-tree)
Using straight.el
(straight-use-package 'leaf-tree)
Usage
To activate the sidebar, run:
M-x leaf-tree-mode
The sidebar will display a hierarchical tree of all leaf declarations in your current buffer. Click on any entry to jump to its definition.
Configuration
| Variable | Description | Default |
|---|---|---|
leaf-tree-flat | Display leaf entries as a flat list instead of a tree | nil |
leaf-tree-click-group-to-hide | Toggle visibility of child entries when clicking a group | nil |
Additional display options are inherited from imenu-list. See the imenu-list documentation for more customization options.
Contributing
Contributions are welcome. Please feel free to submit issues and pull requests on GitHub.
Development Setup
- Install Cask:
# macOS brew install cask # Manual installation git clone https://github.com/cask/cask ~/.cask export PATH="$HOME/.cask/bin:$PATH"
- Run tests:
License
GPL-3.0. See LICENSE for details.
Copyright (C) 2020 Naoya Yamashita
Author
Naoya Yamashita (conao3)

