Disproject is a package for GNU Emacs that implements Transient menus for
dispatching project-related commands on top of the project.el
library. It
aims to provide a more featureful version of the project-switch-project
command, which it is inspired by. Those who are familiar with Projectile may
also find similarities to projectile-commander
.
Some notable features include (but may not be limited to):
- Auto-detecting the current project when starting the menu.
- Switching between projects 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.
- Support for the following directory/project-based environment packages: envrc;
mise.el.
This includes support for using the correct environment when executing commands like
project-compile
after a project switch (see an envrc issue on this). - When available, pre-configured menu commands for: magit; magit-todos.
- A set of customizable variables to substitute some commands in the menu (see Customization).
See images for more screenshots of Disproject menus.
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.