Commit graph

326 commits

Author SHA1 Message Date
Henrik Lissner
7d0caf3efd
New editor/fold module
Extracted from feature/evil and emacs/hideshow.
2019-02-18 00:47:46 -05:00
Henrik Lissner
66131747d3
Update evil-collection-mode-list 2019-02-16 19:04:45 -05:00
Henrik Lissner
a72a0e6a62
Replace magithub with forge
Should also fix void-function/void-variable errors caused by evil-magit
depending on the newer version of magit (#1174).

Also introduces a redesign of the SPC g prefix.
2019-02-16 18:26:17 -05:00
Henrik Lissner
02a3f815a3
Disable evil-escape in term-mode #1156
Causes unintended escape characters to be inserted into the term buffer.
2019-02-14 00:40:19 -05:00
Henrik Lissner
0e8af0e6d2
Integrate evil jumplist into xref #1161
Rather than use xref-pop-marker-stack, evil users can now use the
jumplist to jump from and to xref calls (with C-o/C-i).
2019-02-14 00:40:19 -05:00
Henrik Lissner
5baaf08246
Move evil-mc library to editor/multiple-cursors 2019-01-28 19:54:55 -05:00
Henrik Lissner
069c196330
Appease byte-compiler senpai
Please notice me
2019-01-08 20:54:03 -05:00
Henrik Lissner
b56639e31b
Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
6a03b37dd3
General refactor for comments & docstrings 2019-01-05 15:20:49 -05:00
Henrik Lissner
415a542ce9
feature/evil: rewrite README 2019-01-03 01:49:15 -05:00
Henrik Lissner
64e633df0d
Add feature/evil/+commands.el 2018-12-22 04:43:48 -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
72bf089249 Move evilified helpful keybinds to feature/evil
So that they are available even if config/default isn't enabled.
2018-12-05 22:11:54 -05:00
Henrik Lissner
7c3cc3ed5f Expand %:P relative to % instead of current buffer
So ~/some/other/project/somefile.txt:P will resolve to
~/some/other/project, and not the project root of the current buffer.
2018-12-05 22:11:54 -05:00
Henrik Lissner
54749d04e6
Have :P modifier throw error when not in a project
If it returns nil, it will throw a stringp error otherwise.
2018-10-19 23:27:58 -04:00
Henrik Lissner
005a07b416
+evil:apply-macro: fix operator & fail gracefully
Formly, this would fail silently. This has been rewritten to let you
know if no macro is available at a register. It will also inform you how
many times the macro was executed.

Also fixes g@ not invoking the operator state.
2018-10-18 19:41:29 -04:00
Henrik Lissner
2ca2050c6d
feature/evil: fix o/O indentation in haskell-mode
Refactors +evil*insert-newline-*-and-respect-comments advice. This also
fixes an issue where o uses haskell's line indenter in haskell-mode,
which is naive. Instead, we use haskell-indentation-newline-and-indent,
which is smarter.

This is a dirty dirty hack. May Nyarlathotep have mercy on our souls.

Reported by @ar1a
2018-10-18 12:17:30 -04:00
Henrik Lissner
09f9e12638
Fix evil-open-above in auto-filled comments
If comment-auto-fill-only-comments is enabled, evil-open-above (O) can
break comments, e.g. in haskell

-- 1 :. 2 :. 3 :. Nil
-- |a
--

Becomes

-- 1 :. 2 :. 3 :. Nil
-- |
--
  a
--

Reported by @ar1a
2018-10-17 22:27:41 -04:00
Henrik Lissner
eb1440caa9
feature/evil: add evil-collection-resclient 2018-10-16 18:27:34 -04:00
Zaiste
b4f0d60894
fix: allow deadgreap folding in normal mode 2018-10-08 18:37:13 +02:00
Henrik Lissner
fe425c005e
Add g-/g= keys for buffer narrowing/widening 2018-10-03 11:14:08 -04:00
Henrik Lissner
d9a179d071
feature/evil: refactor neotree-make-executor fix
The autoload is necessary in case neotree was installed in another
session.
2018-09-26 10:46:43 -04:00
Henrik Lissner
3dbeb4e3a7
Add doctstrings to +evil/fold-* commands 2018-09-23 21:06:45 -04:00
Henrik Lissner
8c4504380f
+evil/fold-toggle: don't hide recursively
Otherwise sub-entries will be folded and remain folded when unfolding
entries.
2018-09-23 21:04:20 -04:00
Henrik Lissner
f8fb321f2c
Remove outline support from +evil/fold-close-all
It is buggy in modes with a poorly written outline-level function (like
elisp).
2018-09-22 10:34:31 -04:00
Henrik Lissner
1b3511890e
feature/evil: fix overzealous folding from :n TAB
Changes +evil/matchit-or-toggle-fold to be less trigger-happy about
toggling folds (it will only open folds not, not toggle them).

Also updates its docstring.
2018-09-20 22:27:15 -04:00
Henrik Lissner
feabbc31da feature/evil: add +evil/fold-{next,previous}
Brings zj/zk to evil
2018-09-20 22:27:01 -04:00
Henrik Lissner
5410f1d575 feature/evil: add arbitrary code folding keybinds 2018-09-20 22:27:01 -04:00
Henrik Lissner
6fce87bd06 feature/evil: refactor folding & outline support
Code folding commands will now obey outline headers (if
outline-minor-mode is on and in outline-mode).
2018-09-20 22:26:36 -04:00
Henrik Lissner
316aa428fb lang/evil: refactor +everywhere
Removed unnecessary blocks and reduced the amount of code to maintain.
2018-09-18 21:39:54 -04:00
Henrik Lissner
1b7ae37447
feature/evil: refactor evil-collection integration
+ Move disabled modules into +evil-collection-disabled-list to make it
  easier to maintain our copy of evil-collection-list
+ Update evil-collection-list to reflect changes upstream
+ Fixes errors wrt missing evil-collection-* modules
2018-09-16 12:58:51 -04:00
Henrik Lissner
03ce3db322
feature/evil: update for evil-collection changes
Now, evil-want-keybindings must be set to nil instead of
evil-want-integration.
2018-09-13 19:15:15 -04:00
Henrik Lissner
bd28eea778
feature/evil: remove <> opener/closers
And remove unnecessary def-package block. These commands are already
autoloaded by the package.
2018-09-09 09:58:21 -04:00
Henrik Lissner
89b83f2457
Enable evil-escape-mode
I know this is redundant with the pre-command-hook hook, but the hook
allows us to lazy load the package, and the mode allows other modes (or
the user) to interactively disable it.

For example, evil-mc disabled it while cursors are active due to
incompatibility. This isn't possible if the mode isn't enabled to begin
with.
2018-09-09 09:58:20 -04:00
Henrik Lissner
18554ca5b5
feature/evil: extract advice functions
Into its own autoloads file, for better organization.
2018-09-09 09:58:20 -04:00
Henrik Lissner
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
Henrik Lissner
c0ff5b030a
feature/evil: fix evil-change recommenting line
Due to a bug crossing over from +evil-want-o/O-continue-comments
functionality. It has also been refactored for performance. This also
fixes an issue where smartparens functions could be called before
smartparens was loaded, making o/O inoperable.
2018-09-09 09:58:19 -04:00
Henrik Lissner
e7d5da2686
feature/evil: detect frame cursor-color #851
In case set-cursor-color was used early in the config process (e.g. in
~/.doom.d/init.el), detect it before resorting to #FFFFFF as a default.
2018-09-03 03:58:44 +02:00
Henrik Lissner
895cf136d5
Ensure evil popup rules are defined later
Otherwise they fall before ui/popup's fallback rules in
display-buffer-alist
2018-08-30 13:29:56 +02:00
Henrik Lissner
068cf5f7d4
Rename +evil|save-buffer to be self-explanitory
+evil|disable-vimlike-save-message
2018-08-30 13:29:56 +02:00
Henrik Lissner
2b560a6a0e
General & minor refactoring 2018-08-28 13:36:44 +02:00
Henrik Lissner
9b84d800f3
Make numbered vim markers global
In evil, registers 2-9 are buffer-local. In vim, they're global. This
fixes that.
2018-08-27 21:25:52 +02:00
Henrik Lissner
3e7f1ccf4f
Fix reference to doom-narrow-buffer
This was renamed to doom/clone-and-narrow-buffer at some point.
2018-08-27 03:25:49 +02:00
Henrik Lissner
b14bf99d4b
Fix over-reindentation when o/O continues comments
This would run indent-according-to-mode after creating a new line, which
would often throw new comment lines out of whack. Now it preserves the
indentation of the originating line.

Also fixes continuation whitespace issues with evil-open-above on
C-style block comments.
2018-08-25 19:45:23 +02:00
Henrik Lissner
e3f412abb7
Add +evil-want-o/O-to-continue-comments
Controls whether o/O continue commented lines. Since this is the default
behavior of vim, it is enabled by default.
2018-08-23 18:42:09 +02:00
Henrik Lissner
5714ff423a
Fix evil jumplist after jumping to ag match
helm-ag would formerly add multiple entries to the jump list. It now
only adds one, and recenters the window when jumping to an ag match.
2018-08-13 21:47:55 +02:00
Henrik Lissner
18925b51db
Update comments in feature/evil/+everywhere 2018-08-11 21:03:15 +02:00
Henrik Lissner
8d26879f99
Add :editor multiple-cursors module
Moves evil-mc/evil-multiedit out of feature/evil.
2018-08-06 00:31:23 +02:00
Henrik Lissner
43dcaa1853
Demote evil-collection errors 2018-07-31 19:35:30 +02:00
Henrik Lissner
e94f1f39f4
Enable evil-collection-(deadgrep|imenu-list) 2018-07-30 12:34:53 +02:00