Commit Graph

57 Commits

Author SHA1 Message Date
d1becfce89 config/default: reorganize autoloads 2019-12-23 17:20:19 -05:00
322bca710a General refactors & reformatting 2019-12-20 00:59:52 -05:00
a999a0ddd6 General refactors & comment revision 2019-12-19 14:51:34 -05:00
6f1665563c Error if +default/lsp-format-region-or-buffer in non-lsp buffer 2019-12-04 23:32:13 -05:00
bd4755123f Replace */tasks commands w/ magit-todos-list
If we want ivy/helm interfaces to it, we should use magit-todos as a
backend.
2019-11-15 22:17:31 -05:00
3d26befd47 Move 'SPC /' to 'SPC s'
/ is harder to reach than s, more so on certain keyboard layouts, so
'SPC /' has been moved to 'SPC s'. Similar has been done to other / and
. leader keybinds. Whats more, 'SPC s' for snippets is seldomly used and
available through other means, so it was removed.

Summary:
- 'SPC /' moved to 'SPC s'
- 'SPC f .' and 'SPC f /' moved to 'SPC f f' and 'SPC f F', respectively
- 'SPC p /' removed (already on 'SPC p f')
- 'SPC p ?' moved to 'SPC p F' (doom/find-file-in-other-projects)
- 'SPC n /' moved to 'SPC n s' (+default/org-notes-search)
- 'SPC n .' removed (already on 'SPC n N')
- Remove 'SPC s' prefix for snippets. Was seldomly used and most of its
  commands are available on other keys or through `M-x`, which is
  enough.
2019-11-15 22:17:30 -05:00
21eeb5c1a5 Bind 'SPC i {f,F}' to insert current file name/path 2019-11-15 22:17:30 -05:00
64222c69c8 Fix wrong-number-of-arguments on newline-and-indent
And ensure all custom comment-line-break-function functions its
argument requirements.
2019-11-12 15:24:02 -05:00
f4e641950c Minor, general refactors 2019-11-05 18:46:07 -05:00
e47d357e56 Fix regexp quoting in +default/search-notes-for-symbol-at-point 2019-11-05 18:44:19 -05:00
3d21f4ef5e Add +default/restart-server command
Its keybind on 'SPC q d' was already pushed in ace1eceab
2019-10-26 23:44:29 -04:00
d246307f87 config/default: bind SPC c {F,i,r} to LSP commands
These are experimental keybinds. I'm looking for a way to integrate
LSP's formatter commands (and lsp-organize-imports) into the :editor
format module. And a way to unify refactoring commands (perhaps with emr
or erefactor), including lsp-rename.

- 'SPC c F' -> format region or buffer
- 'SPC c i' -> organize imports
- 'SPC c r' -> rename symbol at point

Addresses #1417
2019-10-22 19:55:50 -04:00
f79d191701 completion/ivy: use region is active & fix regex quoting
Fixes #1930
2019-10-22 12:36:43 -04:00
9634a3860e config/default: invoke magit-todos-list on SPC p t
Before falling back to +ivy/tasks and helm/tasks (not implemented yet).
2019-10-20 19:57:27 -04:00
e10cd8cf2e Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
2d365619cd General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
f90cf1f974 Fix +default/org-notes-headlines 2019-08-28 22:08:13 -04:00
f4a11fd437 Fix #1679: newline-and-indent advice not deleting trailing whitespace 2019-08-21 00:29:12 -04:00
b330728032 Fix #1575: SPC * error when no symbol at point 2019-08-07 18:37:02 -04:00
9ffb740b0f Add SPC / D and SPC / P keybinds #1531
For searching from another directory/project (prompted)
2019-07-02 14:13:30 +02:00
65efbc4204 Fix prompts for search-{cwd,project} commands 2019-07-02 14:06:31 +02:00
57bd7a385e Fix typo in +default/org-notes-headlines 2019-05-20 21:09:10 -04:00
2e6d8be6fc Rethink SPC n keybinds and add new ones
Adds the following keybinds:

SPC n .    Browses org-directory
SPC n /    Text search in org-directory
SPC n *    Text search in org-directory with symbol at point
SPC n h    Jump to org headline in org-agenda-files
2019-05-17 23:57:24 -04:00
b821bfca1f Fix newline-and-indent advice forgetting indentation
e.g. in python-mode docstrings. The point-in-string case is no longer
handled, because indent-according-to-mode handles it properly already.
2019-05-15 15:22:08 -04:00
3c01de8876 Fix #1320: generalize SPC *
Was formerly using ripgrep, and only ripgrep.
2019-04-10 20:14:50 -04:00
3f751c1179 Correctly regexp-quote symbol on SPC * 2019-04-10 20:11:41 -04:00
5e8687cd45 Add SPC * for project-searching symbol at point 2019-04-10 18:57:57 -04:00
f2b8280b2a Add +default/search-from-cwd & +default/search-project 2019-03-08 04:25:45 -05:00
d46bb287ae General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00
ad837e6d13 Move evil ex commands to feature/evil
These commands aren't used by config/default anyway, and
+default:multi-{next,previous}-line were moved to my private config.

Also fixes #1208 (:cd without args will now CD to $HOME).
2019-02-28 14:31:16 -05:00
aa9c4f63ed Fix :cd #1208 2019-02-27 14:43:24 -05:00
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
d46c2582d0 Fix 'not an evil-paste' error on SPC i y #1095
yank-pop and evil-paste-pop are picky little buggers, we need our own
delegate.
2019-02-12 00:51:07 -05:00
d79817edeb Fix unbalanced parens in +default/project-tasks 2019-02-12 00:47:15 -05:00
3694b0d411 Standardize M-RET/M-S-RET as an "add new item" key 2019-01-21 22:07:31 -05:00
9f455edcdf Add interactive form to +default/project-tasks
It is required for key-bound commands. Also added a docstring.
2018-12-31 15:28:35 -05:00
9a0da588d9 Add helm to project tasks 2018-12-28 03:31:03 +02:00
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
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
dc8c01f17f Add +default/newline alias
Forgot to add it in 08beff91
2018-06-28 14:46:33 +02:00
4ad9e18135 +default/easymotion => +evil/easymotion 2018-06-22 12:02:31 +02:00
ab01e0167d Fix evil-easymotion lazyloading middleman
It would fire off the wrong prefix when no operator was active (thus
passing nil to where-is-internal).

Reported by @ar1a
2018-06-22 10:24:48 +02:00
3e802c1b15 Fix +default/easymotion aborting evil operator
Now evil operators will work with +default/easymotion when you first
startup Emacs.

Reported by @ar1a
2018-06-20 18:39:44 +02:00
6693db48af Mark +org-dir obsolete (use org-directory instead)
I prefer not to invent new variables when they aren't strictly
necessary. org-directory is one such variable (although the other path
variables are still necessary).
2018-06-15 01:05:22 +02:00
1e81a35461 Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00
e4c56d0f15 Fix +default:multi-*-line motions in magit buffers 2018-06-02 18:20:09 +02:00
82f240ffc9 Bind SPC h w to +default/man-or-woman #639
Woman is essentially elisp-only Man; useful for systems without
man (Windows, particularly).
2018-06-01 12:13:56 +02:00
1b8dce260b config/default: restore find-in-snippets command #597
And conditionally bind snippets keybinds
2018-05-21 18:34:33 +02:00
34b6d4d0cf config/default: move evil-easymotion keybinds into +bindings.el
It's easier to see and discover this way.
2018-05-16 23:50:50 +02:00
355b4b1364 💥 Replace config/private w/ first-class support
The config/private module has been removed. ~/.doom.d (or
~/.config/doom; whichever is detected first) is now a first class
citizen of Doom and should just work(tm).

Your init.el only needs to contain:

  (require 'core (concat user-emacs-directory "core/core"))

And you may place your doom! block in ~/.doom.d/init.el (or
~/.config/doom/init.el).
2018-04-03 03:07:30 -04:00