3

Each time I open a .toml file I'm asked in the minibuffer:

Support for toml-mode requires installation of layer rust, do you want to install it? (y or n) n

How can I stop that question?

1 Answer 1

3

You have to learn how to ask Emacs questions.

I didn't know the answer to your question when I first read it. However, Emacs revealed the answer after I asked it some questions.

  • Usually, behaviors are controlled by variables.
  • To ask Emacs about variables, you hit C-h v.
    • The Spacemacs alternative is SPC h d v. (Same thing.)
  • Then I typed "spacemacs installation", and I got an autocompleted list of some likely candidates.
    • dotspacemacs-enable-lazy-installation
    • dotspacemacs-ask-for-lazy-installation

After reading their docstrings, I figured out that you have to do this:

(setq dotspacemacs-ask-for-lazy-installation nil)

Remember to ask Emacs first.

The more you learn how to ask Emacs questions about itself, the faster you'll get good at it. Here are a few more to commit to memory.

  • C-h f :: describe function
  • C-h k :: describe key binding
  • M-x ielm :: start an Elisp REPL

Emacs can tell you so much about itself if you ask.

3
  • 1
    Quite valuable. Thank you.
    – jjk
    Commented Sep 13, 2023 at 8:29
  • Nice answer! One twist is to be able to disable lazy installation prompt for a specific layer but I guess that might not be possible? Commented Sep 13, 2023 at 10:10
  • @JurajMartinka That seems a little too specific to be controlled via configuration. Maybe something extremely hacky like making Emacs forget that toml-mode even exists could do it, but I feel like it's not worth the trouble.
    – g-gundam
    Commented Sep 14, 2023 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.