Commit Graph

411 Commits

Author SHA1 Message Date
f81a0e6f41 Remove redundant def-setting! docstrings
def-setting! will now grab the autodef's docstring if it has an
:obsolete property defined.
2018-06-15 16:54:39 +02:00
eaca8c58fa Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
2023aac314 Add +treemacs/toggle command 2018-06-15 03:42:01 +02:00
d8b1e469bc Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
6fe0017e24 Add popup hacks for pdf-tools' annot list windows
Annotations are displayed in stacked windows to the left of the pdf.

Thanks to @UndeadKernel for help figuring this out.
2018-06-14 19:55:36 +02:00
b2b6ff67f2 Prevent treemacs from creating ~/.emacs.d/.cache
Alexander-Miller/treemacs#212 introduced treemacs-persist-file, which we
now use instead of tools/treemacs' old treemacs-persistence hack (which
didn't work).

Relevant to #669
2018-06-14 14:03:10 +02:00
1f07b37c9c Fix elusive back-to-top-level error
These occurred because of disruptive kill-buffer-hooks running when the
backtrace buffer was auto-killed by the popup cleanup system. No more!
2018-06-14 00:45:57 +02:00
a77a967299 Fix elusive 'already at top-level' error
I have hunted this bug on and off for nearly a year now. It would kill
processes randomly, move the point suddenly, and quit the active
minibuffer without warning.

The only clue it'd leave behind is an announcement in the minibuffer:
"Already at top-level".

Thanks to @UndeadKernel for the last piece of the puzzle!

Fixes #436
2018-06-12 14:13:12 +02:00
c8783f3291 ESC -> close treemacs for evil users 2018-06-11 00:11:20 +02:00
8c6e403215 Hide mode-line in treemacs 2018-06-11 00:11:04 +02:00
40077c6c4b Merge pull request #669 from ar1a/treemacs
Add treemacs module
2018-06-10 23:19:43 +02:00
cf6b4f891e Add +everywhere flag to treemacs-evil 2018-06-10 23:17:12 +02:00
cb0ab2fcda Refactor ui/treemacs 2018-06-10 23:16:50 +02:00
7175c7dffb Add initial treemacs module 2018-06-09 12:16:29 +10:00
4b8ac0ad3d Disable fci-mode in org-mode by default
Too many issues caused by variable font and icon sizes in org-mode (see
2018-06-08 14:29:38 +02:00
d008a7e977 Make ui/fci's automatic color change customizable 2018-06-08 13:29:06 +02:00
e918040e70 Add :ui fci module for fill-column-indicator 2018-06-08 13:08:38 +02:00
6729de9918 evil-goggles-duration = 0.1
Display a little longer.
2018-06-04 00:12:51 +02:00
e71cd93488 Don't change which-key settings in doom dashboard 2018-06-03 17:22:23 +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
01b07e573e Fix visual j/k in dashboard and evil-mode
In case you've remapped j/k to gj/gk universally.
2018-06-03 12:04:42 +02:00
4d2e1dd526 Fix modeline growing incrementally on big font mode
Fixes #575
2018-06-02 21:40:57 +02:00
6e6dfc2215 Implement helm project search functionality #644
Adds +helm/project-search, as well as +helm/ag and +helm/ag-from-cwd,
and variants for rg, pt and grep/git-grep, to mirror the functionality
available to :completion ivy.

Also updates the evil ex commands and keybinds
2018-06-02 20:37:02 +02:00
dd57a521f3 Correct :popup/:popups docstrings 2018-06-02 18:20:09 +02:00
209b281dc6 Move popup mode keymaps to autoload.el 2018-06-02 16:58:56 +02:00
e66abfb9e8 Use newline-based alignment technique on dashboard
Fixes #645, because Emacs' mouse events don't appear to compensate for
variable-width whitespace.
2018-06-02 10:48:55 +02:00
90ddc67337 Fix with-popup-rules! macro 2018-05-31 01:34:53 +02:00
abd8f87e28 Move popup keymaps to config.el
This prevents void-variable +popup-buffer-mode-map errors that occur in
some hard to reproduce scenarios.

Also ensures that window-persistent-parameters is being restored when
+popup-mode is disabled.
2018-05-30 23:02:36 +02:00
75e6ea6bee ui/popup: delete old rule in :popup/:popups settings
In case the settings are used or ran after initialization (e.g. in the
case of doom//reload).
2018-05-30 01:39:17 +02:00
73d083b1fa ui/popup: larger Info popups 2018-05-29 16:00:16 +02:00
947fe345c3 Minor, general refactor
In some contexts, map-put is superior to add-to-list.
2018-05-29 15:34:13 +02:00
80f766c151 ui/doom-modeline: load evil-anzu only if evil is enabled 2018-05-29 15:32:36 +02:00
456dc62051 Fix compile-time void-function errors from modeline 2018-05-29 15:32:36 +02:00
442aa91eea ui/doom-modeline: optimize/refactor flycheck segment 2018-05-29 14:13:31 +02:00
9ae99deb65 ui/doom-modeline: optimize vcs segment (experimental) 2018-05-29 14:13:31 +02:00
1a452b6842 💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
fa17de9f19 ui/popup: refactor :popup/:popups settings
And move org popup settings to lang/org
2018-05-26 23:26:45 +02:00
4e2beb8b7e Merge +popup-define's documentation into :popup setting's
Users are more likely to view :popup's documentation for information on
defining popup rules (they shouldn't be using +popup-define!).
2018-05-26 14:20:23 +02:00
6b70831386 ui/evil-goggles: evil-goggles-enable-delete = nil 2018-05-25 00:56:34 +02:00
1e4f108655 ui/neotree: non-capturing groups in neo-hidden-regexp-list
Slight optimization.
2018-05-25 00:56:19 +02:00
643ff13053 ui/doom: make solaire-mode a little pickier
Instead of only activating in buffers that a real (which is more
selective), simply activate in buffers that are file-visiting (this
means that real buffers that aren't highlighted can exist, particularly
term/eshell buffers).
2018-05-25 00:55:06 +02:00
2f83757018 ui/doom-dashboard: more robust feature detection
In case you aren't using those modules, but have other means of loading
those packages.
2018-05-25 00:54:07 +02:00
09cb4f6716 Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
dcec3b9b25 feature/popup: add new autosave window parameter
(autosave . CDR)

This parameter determines what to do with modified buffers in closing
popup windows. CDR can be a t, 'ignore, a function or nil.

+ If t, no prompts. Just save them automatically (if they're
  file-visiting buffers).
+ If 'ignore, no prompts, no saving. Just silently kill it.
+ If nil (the default), prompt the user what to do if the buffer is
  file-visiting and modified.
+ If a function, the return value must return one of the other values.
  It takes two arguments: the popup window and buffer.
2018-05-19 12:08:24 +02:00
80adb9c1f6 General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
3e6d6279a6 ui/evil-goggles: remove unnecessary toggle wrapper command 2018-05-16 13:06:07 +02:00
06c22a5af2 ui/doom-dashboard: add vertical centering (experimental) 2018-05-15 21:49:50 +02:00
94f9e43f25 Rewrite :defer semantics
:defer now supports a hook, a cons cell with (SYMBOL . INTEGER) where
SYMBOL is a hook and INTEGER is a number of idle seconds before the
package is autoloaded, or just the integer (as per the default behavior
of :defer).

Also fixes an issue where switch-buffer-deffered packages (like
smartparens) wouldn't load.
2018-05-15 10:54:45 +02:00
7122a3e01b ui/evil-goggles: enable evil-goggles-mode on load 2018-05-15 03:15:45 +02:00
5537f81e02 ui/doom-dashboard: doom-packages--benchmark => doom|display-benchmark 2018-05-14 20:56:17 +02:00