This prevents the unnecessary eager-loading of many autodefs (and
evil-collection-elisp-mode), since the elisp-mode package is always
available at startup.
Initialize it globally and turn it off where needed, instead of enabling
it on demand. Also fixes void-function: flycheck-mode errors when
:feature syntax-checker is disabled. This is experimental.
Indirectly fixes#710
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.
In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.
Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.
This gained me a modest ~10% boost in startup speed.
This makes quickrun, *doom eval* and *Pp Eval Output* buffers behave
better.
Eval output buffers should a) shrink themselves to the size of their
output (within reason), b) *not* grab focus, and c) be easy to close
from afar with C-g/Escape.
Gotchas:
1. Quickrun gets output asynchronously, so we shrink it on
quickrun-after-run-hook, not in the popup rule.
2. *doom eval* and *Pp Eval Output* opens with its output ready, so the
popup system may shrink those to fit.
3. *doom eval* and *Pp Eval Output* handle window selection themselves.
Let them by setting the select window parameter to #'ignore.
This is a breaking change! Update your :popup settings. Old ones will
throw errors!
Doom's new popup management system casts off its shackles (hur hur) and
replaces them with the monster that is `display-buffer-alist`, and
window parameters.
However, this is highly experimental! Expect edge cases. Particularly
with org-mode and magit (or anything that does its own window
management).
Relevant to #261, #263, #325
Which takes :definitions, :references, :documentation and :xref-backend.
Each accepts a function that will jump to definitions, references, and
documentation respectively.
If a major-mode has an :xref-backend, you don't need :definitions or
:references.
Editorconfig in Lisp enforces lisp-indent-offset too strictly, ruining
its adaptive indentation. We don't want to disable it complete in those
modes however. In all other respects (controlling spaces vs tabs,
charset, max_line_length, etc) editorconfig is great.
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
window-setup hooks; a customization opportunity for users + ensures
custom functionality won't interfere with startup.