Commit Graph

951 Commits

Author SHA1 Message Date
Henrik Lissner
7c9e96da87 General module refactor 2019-03-02 02:04:11 -05:00
Henrik Lissner
8a90f29c91 Make session persistence module agnostic
They've been removed from feature/workspaces and moved into
core/autoload/sessions, which falls back to desktop.el if persp-mode
isn't present. This also offers a substantial speed up to
restart+restoring and restoring sessions in general.

Also fixes #1210, where the newly spawned frame after doom/restart
wasn't focused.

Introduces the following commands:

- doom/restart
- doom/restart-and-restore
- doom/quickload-session
- doom/quicksave-session
- doom/load-session
- doom/save-session
- +workspace/restore-last-session (alias for doom/quickload-session)

And removes

- +workspace/load-session
- +workspace/save-session
- +workspace/load-last-session (renamed to +workspace/restore-last-session)
- +workspace/restart-emacs-then-restore (replaced by doom/restart-and-restore)
- :ss (ex command)
- :sl (ex command)
2019-03-02 01:34:19 -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
Henrik Lissner
5f5874c1fc Fix evil-embrace race condition at startup #345
The previous config would wait for evil-surround to load before adding
evil-embrace's hooks.
2019-02-28 18:26:13 -05:00
Henrik Lissner
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
Henrik Lissner
99904c0e05 Recenter window after lookup commands 2019-02-27 18:39:04 -05:00
Henrik Lissner
d0533fe99c Fix lookup commands erroring when successful
Because message returns non-nil, and +lookup--jump-to needs to return
nil when it fails.
2019-02-27 03:14:47 -05:00
Henrik Lissner
9b7d95f43a Remove doom-cleanup-hook & doom/cleanup-session
These weren't reliable, often times buggy or overzealous about killing
buffers and processes. Best to do it manually or come up with a better
solution.
2019-02-26 22:57:02 -05:00
Henrik Lissner
3e85981695 Add process-menu-mode-map keybinds for evil 2019-02-26 22:55:09 -05:00
Henrik Lissner
de4b18a2dc feature/lookup: refactor backend dispatcher
Hopefully improves compatibility with async handlers. Still a WIP.
2019-02-26 16:57:14 -05:00
Henrik Lissner
7c5eefee3e General, minor refactoring 2019-02-24 13:58:56 -05:00
Henrik Lissner
69ed1a4a99 feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
Henrik Lissner
94b16cba6c Standardize REPL commands & improve SPC o r
- SPC o r now prompts for a REPL to open when none was found for the
  current buffer.
- REPL handlers must now follow the naming convention "*/open*-repl".
  e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc.
- +eval/open-repl has been split in two:
  - +eval/open-repl-other-window
  - +eval/open-repl-same-window
2019-02-18 01:59:56 -05:00
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
99fd8b4e1b O'byte-compiler
Who forbade the obsolete,
Hooks, functions; adieu.

(And an unused argument too)
2019-02-03 18:42:09 -05:00
Henrik Lissner
5baaf08246 Move evil-mc library to editor/multiple-cursors 2019-01-28 19:54:55 -05:00
Henrik Lissner
2e8329e6b6 Fix error message with async lookup handlers
Even if they succeeded.

Mentioned in #716
2019-01-23 16:07:09 -05:00
Henrik Lissner
786d90a85f Revert flycheck-idle-change-delay delay to default
...when exiting insert mode.
2019-01-21 22:19:25 -05:00
Henrik Lissner
99e916348a lang/java: fix java namespace resolution #1098
Now uses slightly more sophisticated namespace resolution when
populating the *.java file template.
2019-01-21 17:39:39 -05:00
Henrik Lissner
500519fe00 Increase flycheck delay in insert mode
Otherwise it can interrupt your typing.
2019-01-14 00:51:25 -05:00
Henrik Lissner
069c196330 Appease byte-compiler senpai
Please notice me
2019-01-08 20:54:03 -05:00
Henrik Lissner
d3fd9f3754 Update Doom module README file template 2019-01-08 00:38:22 -05:00
Henrik Lissner
37cb0e178c Make set-lookup-handlers! additive
Consecutive calls to set-lookup-handlers! would redefine *all* lookup
handlers, unsetting unspecified ones, so you were forced to redefine all
handlers, even if you only wanted to change one. No more. Its side
effects are now additive.

Also adds :async handler support, however, due to their nature, they
cannot fall back to other handlers (there's no reliable way to detect
they worked or not).

To get around this, write a blocking wrapper around the old async method
and register it as a non-async handler.
2019-01-08 00:33:38 -05:00
Henrik Lissner
b56639e31b Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
0502b9581e feature/lookup: reformat/revise README 2019-01-05 17:18:13 -05:00
Henrik Lissner
9db39b0242 feature/lookup: remove unused set-docset! alias 2019-01-05 17:14:57 -05:00
Henrik Lissner
d02b601dd4 feature/lookup: refactor set-lookup-handlers! docs 2019-01-05 17:04:40 -05:00
Henrik Lissner
fffee76f7a feature/eval: update README (remove :repl)
And use a simpler set-repl-handler! example.
2019-01-05 16:55:01 -05:00
Henrik Lissner
6a03b37dd3 General refactor for comments & docstrings 2019-01-05 15:20:49 -05:00
Henrik Lissner
5274ab6368 feature/eval: rewrite README (WIP) 2019-01-03 02:01:57 -05:00
Henrik Lissner
cc36f9608e feature/snippet: reformat README (WIP) 2019-01-03 01:52:06 -05:00
Henrik Lissner
5c9c59a719 feature/file-template: add README (WIP) 2019-01-03 01:51:34 -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
c71a73e43b feature/eval: split shrink-window & scroll-to-bof hook
Easier to customize.
2018-12-06 17:45:53 -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
9363ea8738 Don't trigger flycheck on leaving insert state
This is a bit overzealous (and can be slow where slow checkers/big
projects are involved). Triggering it on ESC from normal mode (or C-g)
should be enough.
2018-11-07 19:24:59 -05: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
Quentin Le Guennec
db9bc3848d feature/workspaces: Fix +workspace-delete to match docstring 2018-10-30 19:10:16 +01:00
Henrik Lissner
9599ca3cf2 feature/lookup: fix missing other-window args
For +lookup/references & +lookup/documentation
2018-10-22 22:16:27 -04:00
Henrik Lissner
915467cb13 feature/lookup: update dumb-jump integration
dumb-jump-go now returns a results plist, so our cl-letf hack is no
longer necessary.
2018-10-21 17:54:15 -04:00
Henrik Lissner
9337c3f8c3 feature/lookup: fix OTHER-WINDOW arg
For +lookup/definition, +lookup/references and +lookup/documentation.
2018-10-21 17:53:23 -04: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
ab95ae1975 feature/eval: minor refactor
Now that I've "backported" display-line-numbers to Emacs 25, it isn't
necessary to conditionally enable nlinum-mode.

Also, use after! isntead of def-package!; this usage is equivalent, and
after! imposes less overhead.
2018-10-19 22:01:01 -04:00