Disproject is a package for Emacs that provides integration with project.el
and allows for dispatching various project-related commands via Transient menus.
It is similar to (and inspired by) the function project-switch-project
, but
also attempts to improve on its feature set in addition to the use of Transient.
Some notable features include (but may not be limited to):
- Auto-detecting the current project when starting the menu.
- Switching between active projects (i.e. only those with open buffers).
- Defining custom per-project suffixes like compilation commands to show in the
menu (see
disproject-custom-suffixes
). - An option to prefer displaying buffers to another window when executing commands.
- When available, integration with: envrc; magit; magit-todos; mise.el.
- A set of customizable variables to substitute some commands in the menu (see Customization).
Main dispatch menu:
An example of using custom dispatch, setting disproject-custom-suffixes
in
the Guix source tree:
Disproject is available on MELPA and MELPA Stable. See Getting Started instructions for using MELPA.
If Guix is available, one may use the package definition in guix.scm
to
install Disproject. For example, to install in the user profile, run the
following in this repository’s root directory:
guix package --install-from-file=guix.scm
Disproject tries to provide usable defaults that don’t require additional
packages or significant configuration; however, it does not provide any keybind
for disproject-dispatch
by default. The following is a suggested minimal
setup using use-package
:
(use-package disproject
;; Replace `project-prefix-map' with `disproject-dispatch'.
:bind ( :map ctl-x-map
("p" . disproject-dispatch)))
Disproject provides a set of customizable variables that can be viewed by
searching for the disproject
group via M-x customize-group
.
Some of these variables customize what commands are called in the main dispatch
menu. To look at just these, search for the disproject-commands
group via
M-x customize-group
which provides additional documentation on how to make
sure commands respect menu settings.
The documentation for disproject-commands
also applies for adding new commands
to the transient menu (e.g. with transient-append-suffix
). Notably, it is
recommended to use disproject-with-environment
to set relevant variables.