Commit Graph

28 Commits

Author SHA1 Message Date
4daa9271a0 Introduce general.el & rewrite map!
+ Now uses an overriding keymap for leader keys, so that it is always
  available, even outside of normal/visual states. In insert/emacs
  states, or in sessions where evil is absent, an alternative prefix is
  used for leader/localleader keys. See these variables:
  + doom-leader-prefix
  + doom-leader-alt-prefix
  + doom-localleader-prefix
  + doom-localleader-alt-prefix
+ Keybinds now support alternative prefixes through the new :alt-prefix
  property. This is useful for non-evil users and non-normal evil
  states. By default, this is M-SPC (leader) and M-SPC m (localleader).
+ Removed +evil-commands flag from config/default (moved to
  feature/evil/+commands.el).
+ config/default/+bindings.el has been split into
  config/default/+{evil,emacs}-bindings.el, which one is loaded depends
  on whether evil is present or not. The latter is blank, but will soon
  be populated with a keybinding scheme for non-evil users (perhaps
  inspired by #641).
+ The define-key! macro has been replaced; it is now an alias for
  general-def.
+ Added unmap! as an alias for general-unbind.
+ The following modifier key conventions are now enforced for
  consistency, across all OSes:
    alt/option      = meta
    windows/command = super
  It used to be
    alt/option      = alt
    windows/command = meta
  Many of the default keybinds have been updated to reflect this switch,
  but it is likely to affect personal meta/super keybinds!

The map! macro has also been rewritten to use general-define-key. Here
is what has been changed:

+ map! no longer works with characters, e.g. (map! ?x #'do-something) is
  no longer supported. Keys must be kbd-able strings like "C-c x" or
  vectors like [?C-c ?x].
+ The :map and :map* properties are now the same thing. If specified
  keymaps aren't defined when binding keys, it is automatically
  deferred.
+ The way you bind local keybinds has changed:

    ;; Don't do this
    (map! :l "a" #'func-a
          :l "b" #'func-b)
    ;; Do this
    (map! :map 'local "a" #'func-a
                      "b" #'func-b)

+ map! now supports the following new blocks:
  + (:if COND THEN-FORM ELSE-FORM...)
  + (:alt-prefix PREFIX KEYS...) -- this prefix will be used for
    non-normal evil states. Equivalent to :non-normal-prefix in general.
+ The way you declare a which-key label for a prefix key has changed:

    ;; before
    (map! :desc "label" :prefix "a" ...)
    ;; now
    (map! :prefix ("a" . "label") ...)

+ It used to be that map! supported binding a key to a key sequence,
  like so:

    (map! "a" [?x])  ; pressing a is like pressing x

  This functionality was removed *temporarily* while I figure out the
  implementation.

Addresses: #448, #814, #860
Mentioned in: #940
2018-12-22 04:14:43 -05:00
db4e17d76d Reindent auth-sources' value 2018-12-05 22:28:37 -05:00
a5f9b8460a setq auth-sources properly 2018-12-05 15:21:53 +11:00
91b76d8437 Move default snippets library to feature/snippets
Removes the +snippets flag from config/default. The default snippets can
be disabled by disabling the emacs-snippets package.
2018-11-02 18:43:44 -04:00
301a01182d config/default: move ruby sp rules
To group them with other major mode rules
2018-10-06 20:44:25 -04:00
271e7689ae Don't error when no gpg keys exist 2018-09-25 10:29:57 -04:00
fad1fc8f1b Resolve GPG keys by user name instead of address #877
epa-file-encrypt-to is now set to the ids of all keys that match
user-full-name, if it is set. This should fix issues with multiple keys
with the same email addresses.
2018-09-21 14:06:15 -04:00
5ef94de541 Minor refactor, reformat & comment revision 2018-09-18 21:39:54 -04:00
a9c925c50b Rename doom*newline-and-indent
To doom*newline-indent-and-continue-comments; to better describe what it
does.
2018-09-14 10:42:09 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
cf55049a17 Disable sp-ruby-*-handler handlers correctly
Reported by @ar1a
2018-07-07 00:32:45 +02:00
633b5b764d Apply smartparens {} fix to enh-ruby-mode too
Fixes:

  {|} => {
    |
  }

in enh-ruby-mode buffers too

Reported by @ar1a
2018-07-06 15:34:26 +02:00
8a4f15b01c Refactor smartparens default rules
Move them to config/default, but move single-lang-specific ones to their
respective modules.
2018-06-25 15:54:38 +02:00
b207c4040b Minor, general refactor 2018-06-07 02:51:46 +02:00
e5a4415d58 General, minor reformatting/refactor 2018-06-02 13:58:04 +02:00
1938a0d253 Enforce encrypted authinfo & store in doom-etc-dir
Plaintext authinfo should not be the default.
2018-06-01 17:10:30 +02:00
1a452b6842 💥 Change first arg of load! macro
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")
2018-05-27 12:52:28 +02:00
09cb4f6716 Major refactor & optimization of how modules load their packages
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.
2018-05-25 00:46:16 +02:00
9a2c4f297c Fix void macro errors after byte-compiling 2018-05-15 03:24:30 +02:00
2712d606c2 config/default: remove unnecessary after! blocks 2018-05-14 20:42:48 +02:00
e44fd886f2 Appease byte-compiler-sama 2018-05-14 20:37:13 +02:00
2b9ade9cc7 config/default: update emacs-snippets config
Package now removes default snippets by itself, no need for us to do it
too.
2018-05-08 01:00:51 +02:00
1983363f9c config/default: add +default-repeat-{forward,backward}-key options 2018-03-25 22:39:03 -04:00
eacb720a8f config/default: fix native evil-snipe repeat keys not being disabled 2018-03-20 15:57:21 -04:00
0156c67ad0 config/default: autoload +default/easymotion 2018-03-20 15:57:21 -04:00
1b5758a6da Minor refactor 2018-03-18 03:36:05 -04:00
800f8c4739 config/default: remove default yasnippet directory
Otherwise, ~/.emacs.d/snippets is always created.
2018-02-15 01:34:12 -05:00
6d7db48dc1 💥 Move :private modules to :config 2018-02-14 23:36:27 -05:00