Commit Graph

367 Commits

Author SHA1 Message Date
Henrik Lissner
a9951ee63b
Autorevert on switch window
Better coverage for lazy autoreverting
2019-06-26 14:31:07 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
c0eb1f524d
Fix exclusion of doom local files in recentf
Due to a load order issue, the doom-local-dir regexp wouldn't be mapped
through our custom recentf-filename-handlers. `file-in-directory-p` is
more robust.
2019-06-26 14:28:40 +02:00
Henrik Lissner
3589ce4c5b
Fix exclusion of doom-local-dir from recentf list 2019-06-18 13:38:21 +02:00
Henrik Lissner
12fa049012
Disable lazy autorevert if auto-revert-mode is used 2019-06-18 00:51:59 +02:00
Henrik Lissner
6be401f1a7
Refactor Doom core & reload autoloads remotely
- Move subr-x/cl-lib loading to core-lib
- Revise docstrings for and rename various CLI functions to be more
  descriptive and up-to-date
- After regenerating autoloads file, bin/doom will try to reload
  autoloads files remotely, through the server/daemon, if possible. This
  is highly experimental and could break
2019-06-16 23:01:17 +02:00
Henrik Lissner
4ae6faf627
scroll-margin = 0 2019-06-10 09:38:56 +02:00
Henrik Lissner
d329f216e3
Fix #1444: recentf hangs Emacs on quit & cleanup
Caused by using file-truename on (disconnected) remote files, which
invoked TRAMP authentication.

Replaces #1451
2019-06-10 09:38:56 +02:00
Henrik Lissner
79941a4fd7
Make recentf more aggressive
- Updates file order on window switch
- Adds dired directories to recentf list
- Reduce recentf-max-saved-items from 300 to 200 (reduce worst-case
  resorting costs)
2019-06-10 09:38:56 +02:00
Henrik Lissner
b68fb2aa11
Fix #1444: exclude TRAMP/remote files from recentf
Causes hanging due to authentication attempts.
2019-05-30 13:58:32 -04:00
Henrik Lissner
4d6d90399e
dtrt-indent-run-after-smie = t
Fix dtrt not updating indent variables in modes that use SMIE (like
sh-mode).
2019-05-22 14:50:31 -04:00
Henrik Lissner
7c3e4ffa0c
Fix over-eager ` pairing in minibuffer 2019-05-22 03:51:12 -04:00
Henrik Lissner
66ddbf981e
Disable persistent undo
It's not worth the possible stack overflow and undo history corruption
issues.
2019-05-21 03:42:32 -04:00
Henrik Lissner
d6aea001c5
Implement lazy auto-revert
Instead of using auto-revert-mode or global-auto-revert-mode, we employ
lazy auto reverting on focus-in-hook, doom-switch-buffer-hook and
after-save-hook.

We do this because autorevert abuses inotify handles, which can grind
Emacs to a halt if you have hundreds of buffers open and something
performs expensive mtime or attribute-altering IO on their files outside
of Emacs. We only really need revert checks when we switch to or save a
buffer, or when we focus the Emacs frame.
2019-05-20 21:08:21 -04:00
Henrik Lissner
39d4fa2256
Improve better-jumper integration into ivy
And remove unnecessary set-jump on imenu-after-jump-hook (it should
happen before the jump, not after).
2019-05-19 02:18:26 -04:00
Henrik Lissner
0674e4b4b0
Remove :emacs imenu module
Some of it was moved into core as reasonable defaults, but the rest of
it doesn't warrant a whole module dedicated to it.
2019-05-19 02:18:00 -04:00
Henrik Lissner
d62e13c803
Alphabetize plugins in core-editor
Easier to find them this way.
2019-05-18 14:44:40 -04:00
Henrik Lissner
ba92adf7b3
Reformat core-ui, add outline headers to core-editor 2019-05-17 01:58:39 -04:00
Henrik Lissner
40d2d4d222
Minor tweaks & byte-compiler offerings 2019-05-15 20:53:11 -04:00
Henrik Lissner
9bc47ca329
Minor refactors
- Don't aggressively load gnu-elpa-keyring-update, it autoloads itself
- Update docstring + comments
- scroll-margin = 1
2019-05-13 19:34:44 -04:00
Henrik Lissner
ddb03c6335
Optimize doom-local-dir entry in recentf-exclude
file-in-directory-p is a tad more expensive.

Also takes into account any modifications to recentf-filename-handlers
2019-05-13 19:34:44 -04:00
Henrik Lissner
646cba3f68
Bring back undo history compression
But only if zstd is available. Also strips text properties from the undo
list. This often provides a 30-50% size benefit, with a negligible
performance impact.
2019-05-13 14:31:49 -04:00
Bryan Gilbert
29fb8b3611 Enable better-jumper-mode when loaded 2019-05-10 12:43:25 -04:00
Henrik Lissner
898ef11b76
Saving the world, one trailing space at a time 2019-05-02 16:20:40 -04:00
Henrik Lissner
aff63899b0
dtrt-indent: silence messages, but still log them 2019-05-02 16:00:18 -04:00
Henrik Lissner
39db0a38c5
Record TRAMP files in recentf 2019-04-29 18:56:25 -04:00
Henrik Lissner
9735f034e1
General refactors & optimizations 2019-04-29 18:54:46 -04:00
Henrik Lissner
4aa4802885
ui/modeline: remove indent segment
It's wasted space now that dtrt-indent logs changes to indentation.

Also resolves a performance issue where the tab/space unicode character
would cause long 3-5s delays on startup or first-file load.
2019-04-29 18:03:18 -04:00
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
a4c5396558
Add better-jumper
Replaces evil's jumplist; makes its functionality available for non evil
users.
2019-04-24 18:16:04 -04:00
Henrik Lissner
500878c882
Enlargen command-log window slightly 2019-04-10 19:25:21 -04:00
Henrik Lissner
f9b6f6746f
General, minor refactor/reformatting 2019-04-08 23:03:19 -04:00
Henrik Lissner
b3d931d7ce
Refactor undo-tree advice 2019-03-28 01:56:09 -04:00
Andrew Whatson
89e91a0291 Fix autoloading helpful for doom/describe-symbol 2019-03-13 06:44:39 +10:00
Henrik Lissner
ff89a5f645
Remove redundant :commands
The helpful package defines these as autoloads already.
2019-03-12 11:25:00 -04:00
Andrew Whatson
7b4afa32e4 Improvements to apropos and describe-symbol
Patch the apropos button types so they call helpful instead of the
built-in describe functions.  Also add some bindings to apropos-mode-map
so it behaves like other help modes.

Add `doom/describe-symbol` function, which shows documentation for
callable and variable symbols.  If a symbol is both a variable and a
callable, it dispatches to apropos.  This gives a better workflow than
`helpful-symbol`, which annoyingly prompts the user.

Remap `describe-symbol` to `doom/describe-symbol`, and update
`+emacs-lisp-lookup-documentation` to call it also.
2019-03-12 18:52:24 +10:00
Henrik Lissner
3f282829bf
Remove describe-symbol -> helpful-symbol remapping
helpful-symbol isn't a drop-in replacement for describe-symbol.
2019-03-11 23:50:11 -04:00
Henrik Lissner
419c3ba1e6
feature/evil: recenter window after / * or # 2019-03-09 03:42:55 -05:00
Henrik Lissner
748b197676
Minor, general refactors 2019-03-08 04:25:45 -05:00
Henrik Lissner
a05b1877be
Rewrite switch-{buffer,window} hooks
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
  doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
  in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
  times it gets triggered.
2019-03-08 02:37:33 -05:00
Henrik Lissner
4fbf7a2687
Remove expand-region package
It was unused, and is redundant with evil's text object expansion keys.
2019-03-08 02:34:26 -05:00
Henrik Lissner
78b4c784a6
Remap describe-symbol -> helpful-symbol 2019-03-03 01:26:30 -05:00
Henrik Lissner
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
Henrik Lissner
ec55884aae
General, minor reformatting & refactor 2019-02-18 00:47:46 -05:00
Henrik Lissner
4617e00b91
Autoload sp-point-in-{comment,string}
Some commands (like doom/forward-to-last-non-comment-or-eol) can use
this before smartparens has loaded.
2019-01-05 15:21:27 -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
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
63e25b349d
Silence undo-tree a little less destructively
undo-tree-load-history was formerly advised with doom*shut-up, which
uses the quiet! macro to suppress output. quiet! accomplishes this by
temporarily redefining message to a no-op function. However, if a fatal
error occurs while this binding is active, in some cases, message will
remain redefined, perpetually silencing all output to the minibuffer.

This tries to mitigate that, at least where undo-tree is concerned.

Also sharp-quotes an unquoted function.
2018-10-16 02:51:11 -04:00
Henrik Lissner
d21887149f
Minor refactor/reformatting 2018-10-06 20:44:25 -04:00
Henrik Lissner
5b4690419b
Increase doom-large-file-size threshold to 2mb
1mb is a little *too* conservative.
2018-10-03 15:10:08 -04:00