Commit graph

172 commits

Author SHA1 Message Date
Henrik Lissner
1fb2178716
Move sp skip-match disabler to config/default
This shouldn't be mandatory.
2019-04-24 18:16:04 -04:00
Henrik Lissner
94a2bc77ef
Unbind C-h in help-map
It interferes with which-key help/paging for the SPC h prefix.
2019-04-12 16:13:51 -04:00
Henrik Lissner
5cdb96888f
config/default: refactor/reformat help keybinds
Reduce internal usage of map! and improve readability of comments for
help-map binds.
2019-04-04 22:38:46 -04:00
Henrik Lissner
4b631f07ef
Apply smartparens config to all users
Not just evil users.
2019-04-03 19:15:02 -04:00
Henrik Lissner
5b890757e1
Add which-key labels for leader/localleader keys 2019-04-02 02:42:38 -04:00
Henrik Lissner
2dc52bc9be
💥 Replace exec-path-from-shell w/ 'bin/doom env'
IMPORTANT: This is a breaking update for Mac users, as your shell
environment will no longer be inherited correctly (with the removal of
exec-path-from-shell). The quick fix is: 'bin/doom env refresh'. Also,
the set-env! autodef now does nothing (and is deprecated), be sure to
remove calls to it in your config.

Smaller changes:
+ This update also adds --no-* switches to doom quickstart
+ Includes general improvements to the documentation of several bin/doom
  commands.
+ Moves doom/reload* commands to core/autoload/config.el
+ doom/reload-project has been removed (it didn't actually do anything)

The breaking change:
This update adds an "envvar file" to Doom Emacs. This file is generated
by `doom env refresh`, populated with variables scraped from your shell
environment (from both non-interactive and interactive sessions). This
file is then (inexpensively) loaded at startup, if it exists.

+ The file is manually generated with `doom env refresh`.
+ It can be regenerated automatically whenever `doom refresh` is run by
  running `doom env enable` (`doom env clear` will reverse this and
  delete the env file).
+ `doom quickstart` will ask if you want to auto-generate this envvar
  file. You won't need it if you're confident Emacs will always be
  started from the correct environment, however.
+ Your env file can be reloaded from a running Emacs session with `M-x
  doom/reload-env`. Note: this won't work if the Emacs session you're
  running it in doesn't have a correct SHELL set. i.e. don't use this to
  create your first env file!

The idea isn't mine -- it's borrowed from Spacemacs -- and was
introduced to me in #1053 by @yurimx. I was impressed with it. Prior to
this, I was unhappy with exec-path-from-shell (no hate to the dev, I
understand its necessity), and 'doom patch-macos' wasn't ideal for mac
users (needed to be reapplied every time you update Emacs). What's more,
many users (even Linux users) had to install exec-path-from-shell
anyway.

This solution suffers from none of their shortcomings. More reliable
than patch-macos, more performant and complete than
exec-path-from-shell, and easily handled by bin/doom.
2019-03-28 01:56:09 -04:00
Henrik Lissner
90f36bceff
Undo 1f23eecd: un-homogenize TAB/RET/ESC
This is more trouble than its worth. Better to deal with the old edge
cases than the new ones this causes.

Addresses #1218
2019-03-14 17:59:24 -04:00
Henrik Lissner
5c7da455f8
More help-map keys and remaps
- Move profiler from 't' to 'T' (as not to override
  `help-with-tutorial', esp for non-evil users)
- Replace C-c (describe-copying) with describe-coding-system
- Bind doom/describe-symbol to 'h'
- Bind `describe-key-briefly' to 'C-k'
2019-03-13 01:54:40 -04:00
Henrik Lissner
5e5ae456bb
Replace doom/what-face with describe-char
describe-char produces the same information and much more.
2019-03-13 01:37:55 -04:00
Henrik Lissner
66d75936fc
config/default: split into evil/emacs files
Done to better facilitate a non-evil config.

- Adds winum (and enables support for it in doom-modeline)
- Adds expand-region (#1231)
- Uses default smartparens config for non-evil users (WIP)
2019-03-09 03:43:14 -05:00
Henrik Lissner
54d1c0dd56
Minor, general refactors 2019-03-09 03:42:55 -05:00
Henrik Lissner
442bd7cfb9
Only apply prefix arg fix to evil leaders 2019-03-09 02:42:32 -05:00
Henrik Lissner
9758aae389
config/default: move help keybinds out of +bindings
These ought to be available to all users, whether or not they want the
rest of Doom's keybinds.
2019-03-09 02:42:31 -05:00
Henrik Lissner
748b197676
Minor, general refactors 2019-03-08 04:25:45 -05:00
Henrik Lissner
1f23eecdc8
(Try to) homogenize TAB/RET/ESC keybinds
Map them to \t/^M/^[, rather than [tab], [return] and [escape].
2019-03-08 04:25:45 -05:00
Henrik Lissner
6a8b968807
Autopair HTML <!-- --> more conservatively 2019-03-02 01:38:18 -05:00
Henrik Lissner
fb57f367e7
Enable delete-selection-mode & shift-select-mode
This makes text insertion behave more like traditional editors.

Delete-selection-mode allows selections to be replaced when yanking or
inserting. This enables it by default for non-evil users and in insert
mode for evil users. Also enables selecting text with shift.
2019-03-02 01:34:14 -05:00
Andrew Whatson
6e4e11ebb8 Remove C/C++ tab-always-indent override 2019-02-26 20:30:00 +10:00
Henrik Lissner
acddf6a047
Move delete-backward-char & newline-and-indent advice
To config/default; the only place it is used.
2019-02-22 00:25:30 -05:00
Henrik Lissner
afae6e4f1d
Remove doom/toggle-comment-region-or-line
Replaced with simpler keybinds.
2019-02-21 19:13:36 -05:00
Henrik Lissner
ed0a4bc5ca
lang/csharp: add electric/autopairing behavior 2019-02-18 15:38:26 -05:00
Henrik Lissner
9dd88e5924
Move c electric disabler to config/default
Because it is tied to the smartparens config, and we'll want this
behavior to extend to all C-derived modes (like csharp and php modes).
2019-02-18 15:36:44 -05:00
Henrik Lissner
1676cc56e3
config/default: standardize C/M/s-RET behavior
Also enable these to work from normal mode.

Mentioned in #1146
2019-02-03 18:56:07 -05:00
Sean Farley
11b4a3502a bindings: add common comment toggle
This is fairly common in most editors so let's make lives easier.
2019-01-28 23:14:14 -08:00
Sean Farley
febad24a1d bindings: add some more macos behaviors 2019-01-28 23:14:14 -08:00
Henrik Lissner
e9d09d17da
Remove s-x / s-; keybinds 2019-01-28 21:00:41 -05:00
Henrik Lissner
6da148e928
Fix s-q on macos for non-evil users
There's no guarantee evil-quit-all will be defined.
2019-01-28 20:17:37 -05:00
Henrik Lissner
082bdfe865
Add C-RET/C-S-RET aliases for M-RET/M-S-RET 2019-01-22 19:29:13 -05:00
Henrik Lissner
f264a9bc6e
Back to command = super, option = meta on MacOS
On MacOS, command used to be 'meta, which Emacs (and many packages) use
for many keybinds. I don't want to pollute the command key, so it is now
meta (as is the Emacs default).

The MacOS keybind fixes have been moved back to super.
2019-01-22 19:29:13 -05:00
Henrik Lissner
a32c5f7869
Move macos super key fixes to meta
And add Option motion keybinds.
2019-01-22 04:11:11 -05:00
Henrik Lissner
1f523dfdd6
Replace global meta keybinds w/ super fixes on Mac
These super keybinds are exclusively to repair conventional behavior for
CMD OS keys.
2019-01-21 22:09:02 -05:00
Henrik Lissner
139ef46956
Also bind s-x to execute-extended-command
Makes M-x harder to miss (in the case where you use multiple computers
with different modifier layouts on their keyboards).
2019-01-21 22:07:58 -05:00
Henrik Lissner
3694b0d411
Standardize M-RET/M-S-RET as an "add new item" key 2019-01-21 22:07:31 -05:00
Henrik Lissner
17c1759457
Revise smartparens doc comments 2019-01-21 21:19:00 -05:00
UndeadKernel
cbd91a4d3e bindings: standardize movement to the start or end 2019-01-21 11:15:39 +01:00
UndeadKernel
4bc5fac0b2 bindings: Mimic MAC window changes withing emacs
The binding applies for evil and non-evil users alike.
2019-01-21 11:15:23 +01:00
UndeadKernel
00ce44a733 bindings: CUA bindings only in evil 2019-01-11 15:09:21 +01:00
Undead Kernel
b0b666b8f5 bindings: default set of bindings for emacs users 2019-01-10 13:52:35 +01:00
Henrik Lissner
ceb06e1948
Fix C-style doc comment pair expansion
Some major modes rely on external parsers for correct indentation, like
js2-mode or enh-ruby-mode. They don't properly indent the closing
comment pair (*/), so we do it manually.
2019-01-08 00:38:46 -05:00
Henrik Lissner
93c537e6a7
Revise C-a/C-e/C-u/C-w/C-b/C-f keybinds
+ C-b/C-f/C-w/C-u are from vim, and so will only be set for evil users.
+ C-a/C-e exists in both vim and Emacs, so we make them smarter for both
  users.
2019-01-05 17:53:11 -05:00
Henrik Lissner
46499ec70f
config/default: minor keybind refactor 2018-12-31 15:55:46 -05:00
Henrik Lissner
6d10b9bbdf
Revert to Meta, instead of Super
Using meta is a little more flexible. Since there is no dedicated meta
key on our keyboards (anymore), it can be remapped to another modifier
by changing mac-command-modifier, x-meta-keysym, etc. without
sacrificing super or alt keybinds.
2018-12-31 15:00:05 -05:00
Henrik Lissner
9f2dff02fa
Rethink config/default & keybindings
+ Added +smartparens flag to config/default for default smartparens
  config.
+ Fixed +tng support for completion/company.
+ Removed super keybinds (for all but MacOS)
+ Moved "keybind fixes" to config/default/config.el (these should be
  universally available).
+ Replaced both +default-repeat-forward-key and +default-repeat-backward-key
  with +default-repeat-keys. If this variable is nil, the universal
  repeat motions won't be bound.
2018-12-24 00:04:50 -05:00
Henrik Lissner
9936532ea3
Move auth-sources & mc/list-files
...to move appropriate locations.
2018-12-23 23:16:03 -05:00
Henrik Lissner
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
Henrik Lissner
db4e17d76d
Reindent auth-sources' value 2018-12-05 22:28:37 -05:00
Aria
a5f9b8460a setq auth-sources properly 2018-12-05 15:21:53 +11:00
Henrik Lissner
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
Henrik Lissner
301a01182d
config/default: move ruby sp rules
To group them with other major mode rules
2018-10-06 20:44:25 -04:00
Henrik Lissner
271e7689ae
Don't error when no gpg keys exist 2018-09-25 10:29:57 -04:00