which-key labels are registered globally, and will not work for
buffer-local keybinds. Until general is brought in, we'll have to suffer
label-less localleader keybinds.
General code and comment improvements.
Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
set-docsets!)
+ New +lookup/install-docset alias
This addresses two edge cases:
1. if web-mode-auto-close-style == 3, <'s behavior may insert an extra
>
2. Some web-mode engines have pairs that end with smartparens pairs,
which will result in web-mode inserting its closing pairs _and_
smartparens inserting its closing pairs; resulting in extra
characters.
Reported by @ar1a
+ Enables web-mode's autopairing functionality
+ Prevents duplicate >'s after web-mode autopairing.
+ Leave longer-than-3-character pairs to smartparens (there was only
<!-- -->)
+ Remove <?p -> <?php | ?> autopairer. Leave that to snippets (web-mode
doesn't support prefixes longer than 3 letters, and <?php ?> is too
much of a performance drain to have smartparens support it, so I added
a "php" snippet that expands to <?php | ?>).
+ Tags now auto-close when you finish typing the opening
tag. (web-mode-auto-close-style = 2)
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!
I am slowly phasing out the setting system (def-setting! and set!),
starting with these.
What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.
The old set! function will still work, for a while.
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.
Much of this config is done in package autoloads, and now that
auto-mode-alist is cached in doom-package-alist (after reading autoload
files), we can save some space by removing redundant config.
Web mode has a bunch of helpful commands under `C-c`, this replicates the same
bindings, but in leader-key style. E.g.: `C-c C-a k` becomes `SPC m a k`
+ 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.