Commit Graph

8076 Commits

Author SHA1 Message Date
Henrik Lissner
29f119ad4d
Hook +javascript-npm-mode into typescript-mode
This way typescript projects will be aware of node_modules.
2018-12-23 16:01:37 -05:00
Henrik Lissner
451c16b8ee
Revise :after-call & :defer-incrementally comments
Now implicitly adds the current package to :defer-incrementally's list
of packages.
2018-12-23 00:25:51 -05:00
Henrik Lissner
0efa915164
Fix :leader/:localleader targeting preceding keys
This fixes an issue where even the keys preceding :leader/:localleader
were registered as leader/localleader keys.
2018-12-23 00:10:18 -05:00
Henrik Lissner
f35837755c
Disable tools/editorconfig by default 2018-12-22 20:18:29 -05:00
Henrik Lissner
695edd7a14
Merge pull request #1055 from chengyi/add-rust-keybinding-description
add rust key bingding description
2018-12-22 20:08:31 -05:00
Henrik Lissner
02624251c1
lang/rust: update keybinds for new map! 2018-12-22 20:07:18 -05:00
Henrik Lissner
032bde6aa2
Fix malformed keybind remapping 2018-12-22 19:34:56 -05:00
Henrik Lissner
91474c98ee
Fix localleader binds hijacking SPC in insert mode 2018-12-22 19:33:20 -05:00
Henrik Lissner
5447927e6a
Refactor map! tests 2018-12-22 19:30:00 -05:00
Henrik Lissner
4383531b32
Ensure gerneral-implicit-kbd=t in map!
Also updates map! tests (TODO: abstract all those cdr-caddr's!)
2018-12-22 17:11:20 -05:00
Henrik Lissner
954b0f9c5d
Minor tweaks to map! calls for correctness
+ :map arguments shouldn't be quoted
+ :localleader keys default to all states in the absence of state
  modifiers. This is preferred, rather than restricting their use to
  normal state.
+ :map* is deprecated (there is no difference between it and :map)
2018-12-22 17:01:00 -05:00
Henrik Lissner
a29163740d
GIT_ASKPASS=git-gui--askpass for GUI Emacs+Windows 2018-12-22 17:00:06 -05:00
Henrik Lissner
604a41527f
Use general custom definers rather than :definer
The former approach was the cause for a huge increase in startup
time (adding ~0.4s) when :leader and :localleader were used. This is
because general-define-key was called for every key-def pair.

This new approach batches these calls, which has decreased the
performance impact by at least 80%.
2018-12-22 16:50:01 -05:00
Henrik Lissner
d222327d24
Reformat SPC n keys
Used to be in general-define-key format, now in canonical map! format.
2018-12-22 16:48:42 -05:00
Henrik Lissner
fc24c3bff2
Fix #1056: S key in insert/emacs state
A keybind intended for operator mode was bound globally.
2018-12-22 16:40:46 -05:00
Henrik Lissner
a124497f4e
find-file-visit-truename = t 2018-12-22 14:30:29 -05:00
Henrik Lissner
4a69fb5d29
Fix non-prefix key error on MacOS
kbd is necessary for global-set-key, otherwise it reads M-` as three
keys M, - and `, and M is already bound to self-insert-command, so it
cannot be used as a prefix.
2018-12-22 14:23:11 -05:00
Henrik Lissner
43fa39eaf1
config/default: restore q, p, r, s, t leader groups 2018-12-22 05:29:57 -05:00
Henrik Lissner
4d3587c8d0
Fix void-variable list error in multi-state binds
Caused by overzealous re-setting of a variable in a loop, when it should
only be set once.
2018-12-22 05:20:43 -05:00
Henrik Lissner
5e33fefd74
Fix malformed map! yasnippet keybinds
Causing breaking errors.
2018-12-22 05:20:02 -05:00
Henrik Lissner
64e633df0d
Add feature/evil/+commands.el 2018-12-22 04:43:48 -05:00
Henrik Lissner
65290d3d2f
app/irc: re-nest keybinds
And restore missing circe-command-NAMES keybind.
2018-12-22 04:36:51 -05:00
Henrik Lissner
5331a28533
set-pretty-symbols!: fix void-variable mode error
Occurs when unsetting pretty symbols for a mode
with (set-pretty-symbols! 'some-mode nil), because of a forgotten loop
and let-var.
2018-12-22 04:25:15 -05:00
Henrik Lissner
d6cb0ec5f5
General cleanup & minor refactoring 2018-12-22 04:25:15 -05:00
Henrik Lissner
3dd34abe61
Remove hide-undefined-binds advice for which-key
Before general.el was introduced to Doom, commands were bound to keys
whether or not their containing modules were enabled. This was out of
laziness and readability. I intend to change this, as such it is no
longer necessary to hide unavailable keybinds from which-key.
2018-12-22 04:25:15 -05:00
Henrik Lissner
674ad9837d
Update after! docstring 2018-12-22 04:25:15 -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
wanghao
56a2c15c44 add rust key bingding description 2018-12-19 19:00:58 +08:00
Henrik Lissner
ce38a80cf8
emacs/dired: refactor #1038
+ Removed ranger/dired-setup hook and performed its config globally
+ Lazy-loaded ranger
+ Removed unnecessary `:defer t`s (redundant with :commands and :hook)
  and `:commands` (redundant with :hook)
+ Set image-dired-dir before trying to create it, to give users an
  opportunity to modify it before it is created
+ Use sharp quotes consistently for keybind commands
2018-12-13 15:44:43 -05:00
Henrik Lissner
5e7a2d8703
Merge pull request #1038 from ztlevi/ranger
Adding Ranger module to doom
2018-12-13 15:04:37 -05:00
Henrik Lissner
a89a2aa70c
completion/{helm,ivy}: fix stringp error
Cause by the expectation that doom-project-root would never return
nil (which was changed to return nil if not in a valid project, due to
an update upstream, in projectile).
2018-12-11 18:59:30 -05:00
Henrik Lissner
a37d199862
lang/org: add ob-async 2018-12-10 20:31:31 -05:00
Henrik Lissner
ced8f94830
lang/org: improve ob-async lazy loading
ob-async adds its own advice around org-babel-execute-src-block, which
directly interferes with Doom's lazy loader for babel
packages (sometimes bypassing it entirely). This ensures it can't do
that.
2018-12-10 18:09:28 -05:00
Henrik Lissner
f4698d2f0a
Fix uncaught errors during incremental load 2018-12-10 13:50:58 -05:00
Henrik Lissner
2d13dbe10a
lang/org: fix ob-async support
ob-async uses org-babel-load-languages to load babel packages in a child
process, but packages entered into the org-babel-load-languages variable
by Doom's lazy loader were misnamed. This caused load errors in the
child process.

The language-to-package resolution is now performed before it is entered
into org-babel-load-languages. Additionally, ob-async will now be lazy
loaded if it is available (and fail silently otherwise).
2018-12-10 13:50:58 -05:00
Ting Zhou
be531d4dcc emacs/dired: enable evil-window-map in motion state 2018-12-08 22:34:27 -08:00
Ting Zhou
eedbbdd9c1 emacs/dired: use all-the-icons font lock fix recipe 2018-12-08 21:52:24 -08:00
Henrik Lissner
9144bcb19c
Merge pull request #1042 from ar1a/swoop-cleanup
Clean up after swoop removal
2018-12-08 12:17:20 -05:00
Aria
d378fdbed0 Clean up after swoop removal
removed in 7f5e778b0c
2018-12-08 19:17:52 +11:00
Ting Zhou
d6ad5942be emacs/dired: move ranger module to ranger feature in dired module 2018-12-07 22:27:03 -08:00
Henrik Lissner
67fa4b31ea
Restore =S gpg-sign option for magit
Curiously, interactive rebasing seems to fail to sign commits without
this option present in some cases.
2018-12-07 18:00:17 -05:00
Henrik Lissner
5e96b42ccc
lang/latex: fix TeX-latex-mode error
Caused because use-package is creating an autoload for TeX-latex-mode as
if it were in the tex package, but it's in the latex package, instead.

Since auctex already autoloads TeX-latex-mode, there's no need to set
our own.
2018-12-06 19:07:36 -05:00
Henrik Lissner
1610cd32b2
ui/popup: respect org-src-window-setup
Added a new value for org-src-window-setup: 'popup-window

Other values (like 'other-window) will revert to org's old behavior.

Needs more testing.
2018-12-06 17:52:12 -05:00
Henrik Lissner
5c14fb42e0
Add +popup/diagnose for debugging popup rules 2018-12-06 17:51:40 -05:00
Henrik Lissner
b41e38dcf4
Make RET respect popups in Buffer-menu 2018-12-06 17:50:32 -05:00
Henrik Lissner
745bd3238c
Fix delete-other-windows from inside popups
Occasionally, a window will lose its popup status, but not its special
window parameters, forcing non-popups to be treated like popups when
delete-other-windows is called.
2018-12-06 17:45:53 -05:00
Henrik Lissner
c71a73e43b
feature/eval: split shrink-window & scroll-to-bof hook
Easier to customize.
2018-12-06 17:45:53 -05:00
Henrik Lissner
c56f802b4b
Update (if|when)-let* alias comments 2018-12-06 17:45:53 -05:00
Henrik Lissner
b5552eed39
Improve predicate fn for byte-compile targets
Will now avoid dotfiles and unit test files.
2018-12-06 17:45:53 -05:00
Henrik Lissner
6bd7b72281
Restore startup optimizations on after-init-hook
Fixes an issue where tramp file handlers were overwritten because they
were added to file-name-handler-alist at the end of after-init-hook.
2018-12-06 17:45:50 -05:00