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
TAB now either indents, expands the snippet at point, or expands the
emmet expression at point.
Also it now falls back to emmet-expand-line if yasnippet won't load.
+ 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.
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.
If you use load!, you need to change its argument to a string!
e.g. (load! +my-module) => (load! "+my-module")
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`