Lambda-Emacs / lambda-emacs

Emacs distribution with sane defaults, pre-configured packages, and useful functions.
MIT License
154 stars 12 forks source link

How to disable a package I don't want? #27

Closed lccambiaghi closed 1 year ago

lccambiaghi commented 1 year ago

Hi, I am trying lambda-emacs, is there an easy way to disable a package in my config.el file? Say for instance I want to disable corfu (and kind-icon).

Currently I am using ripgrep to find the use-package definition and adding :disabled t. I am using the package-el branch so I was thinking there should be an easy way! Thanks

mclearc commented 1 year ago

If you're just disabling one or two packages then using :disabled is the way to go. How are you setting installed packages? Is lem-package-ensure-packages set to t? If so then use-package automatically installs any missing packages unless you have :ensure nil in the use-package statement. If, however, you have lem-package-ensure-packages set to nil, you will need to maintain a package list, but could just not have packages you don't want on the list (e.g. don't include corfu and kind-icon). Have a look at my early-config.el file for how that might be done.

To avoid conflicts you might consider just copying only the parts of the module that you use into a separate setup-*-file.el. To navigate the config more easily (assuming you are loading lem-setup-functions.el) use lem-find-lambda-files and lem-search-lambda-files.