Commit Graph

789 Commits

Author SHA1 Message Date
1c4215c187 Fix 'command not found' errors for hidden commands 2019-07-22 04:46:14 +02:00
5e0177d667 ui/workspaces: conform to new hook/advice conventions 2019-07-22 02:37:47 +02:00
448ec65997 ui/fill-column: move init code into autoload. 2019-07-22 02:37:46 +02:00
256284f5c0 ui/hl-todo: add HACK, REVIEW & DEPRECATED keywords
And include following colon, if any.
2019-07-22 02:37:46 +02:00
7058facf9d ui/vc-gutter: disable git-gutter in some modes
Disabling git-gutter in fundamental-mode theoretically reduces the
number of times git-gutter is initialized (because it has to switch to
and from fundamental-mode once, sometimes twice, when changing major
modes).

git-gutter also has trouble with org-indent-mode, so we disable it
there.

And it isn't useful in image-mode.
2019-07-22 02:30:41 +02:00
b01606e99b ui/vc-gutter: fix gutter not updating after stage
When using git-gutter:stage-hunk, the gutter would be updated just
before its state is changed, creating a stale diff.
2019-07-22 02:30:41 +02:00
ee10b3b0d9 core-lib: add doom-{glob,path,dir}, replace {file,dir}!
- file! replaces FILE!
- dir! replaces DIR!
- doom-{glob,path,dir} have the power to construct paths out of the
  segment pieces provided to it.
- Move doom-files-in to core-lib and refactor to use the above.
2019-07-22 02:30:39 +02:00
99e23adec1 ui/doom: simplify solaire init 2019-07-22 02:30:38 +02:00
8c41093fae ui/doom: update doom-themes config for treemacs/neotree 2019-07-22 02:30:38 +02:00
149b2617b0 💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
51d3b1b424 💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
b57dccf825 ui/tabbar: remove buffer-order function reference
centaur-tabs-adjust-buffer-order-function and
centaur-tabs-adjust-buffer-order were removed upstream
2019-07-13 12:03:13 +02:00
92ca6762ac ui/tabbar: rewrite to use centaur-tabs
Plus some modifications to make tabs truly window-local, like they are
in any tabbed modern editor.
2019-07-12 17:40:48 +02:00
dbcd2f7624 Move treemacs-last-error-persist-file out of ~/.emacs.d
Git off my lawn.
2019-07-11 17:22:27 +02:00
394d13179f Fix Org tags popup hack
Causing Org tags output to be written to the source buffer.
2019-07-10 17:28:20 +02:00
14b1e36812 ui/popup: fix *Org tags* popups
- So the mode-line doesn't "hide" the last line of the popup
- So org doesn't delete all other windows when displaying the *Org tags*
  popup
- Minor corrections to comments in ui/popup/+hacks.el
2019-07-10 12:41:51 +02:00
2f86c01170 Add default popup rule for M-x calc 2019-07-09 19:55:37 +02:00
c5cd29ef74 ui/workspaces: refactor restoration of indirect buffers 2019-07-08 21:21:02 +02:00
53d1bf6b58 Refactor +popup/other 2019-06-30 18:12:16 +02:00
20b397362b Don't auto-kill term/vterm/eshell dedicated popups 2019-06-27 01:27:40 +02:00
525cba3f3b ui/workspaces: fix +workspaces|init for daemon 2019-06-26 19:17:56 +02:00
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
f4ef25bb12 Don't delete-other-windows during org-agenda popup 2019-06-26 14:31:06 +02:00
b5c5b7f10d Move posframe+persp-mode fix to ui/workspaces 2019-06-26 14:31:06 +02:00
9823881d47 ui/workspaces: general refactor
- Fixes #1506: unsets uniquify-buffer-name-style to work around breakage
  in persp-mode having to do with buffers being retrospectively renamed.
  See Bad-ptr/persp-mode.el#104.
- Move creation of main workspace into persp-mode-hook, to ensure main
  workspace always exists and nil workspace is never active.
- Remove +workspaces|init-frame and significantly reduce LOC in
  +workspaces|init to the bare essentials. This _may_ break persp-mode
  in daemon Emacs, but I'll deal with that next.
2019-06-26 14:30:37 +02:00
7a4bce3f9a ui/workspaces: associate buffers on buffer switch
We stop relying on the built-in mechanism for auto-registering a buffer
to the current workspace, because it misses many buffers (e.g. when we
switch buffers with SPC b b). Instead, we add buffers when they are
interactively switched to.
2019-06-26 14:28:40 +02:00
2e96fce2e0 ui/modeline: remove obsolete advice (fix #1372) 2019-06-19 11:37:27 +02:00
f2d7c5625d Revise comments & docstring 2019-06-18 14:43:05 +02:00
80958c0c17 Ensure non-dedicated window is active on workspace creation
Otherwise, workspaces are left in a broken state where they only contain
dedicated/side-windows, which Emacs can't handle well.

Indirectly fixes #1492
2019-06-14 12:34:23 +02:00
84fd744e3f Minor, general refactor & comment revision 2019-06-14 11:08:59 +02:00
0f58634df4 Fix git-gutter:disabled-modes check #1482
Also ignores git-gutter-fringe config if package was disabled.
2019-06-13 10:10:37 +02:00
c9305a552d Fix void-function make-xpm errors
Nobody should be using :ui tabbar. I'll remove it eventually.

Mentioned in #1485
2019-06-12 23:53:11 +02:00
74a4700486 ui/vc-gutter: conform functions to conventions
Since the module was renamed...
2019-06-12 20:24:11 +02:00
77a7b76108 ui/vc-gutter: respect git-gutter:disabled-modes #1482 2019-06-12 09:32:55 +02:00
a1c1d8818a Fix #1456: handle remote PWDs in dashboard
Otherwise, invisible TRAMP authentication prompts would hang Emacs.
2019-06-11 16:21:37 +02:00
bc6c4b3e37 Add +workspace/other #1480
- Rename +workspace/switch-to-last to +workspace/switch-to-final, to
  avoid ambiguity.
- Add +workspace/switch-to-N commands
2019-06-11 16:12:06 +02:00
e7c12b1bb6 ui/workspace: minibuffer-message -> message
minibuffer-message adds 2 seconds to emacsclient calls that create new
workspaces.
2019-06-10 09:38:55 +02:00
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
9e8517c59e Add :editor objed module
Integrates `objed` with Doom Emacs to provide text-object manipulation
for non-evil users.

See https://github.com/clemera/objed
2019-05-30 22:35:27 +10:00
6dcbaef570 ui/indent-guides: don't omit first level of guides 2019-05-29 23:46:18 -04:00
febeed2526 ui/nav-flash: blink on window switch conditionally
The alternative is too aggressive.
2019-05-22 17:11:24 -04:00
6745ff1323 ui/vc-gutter: resize git-gutter popup to fit
Due to the prompt, you can't scroll the git-gutter popup, making it
difficult to see the full diff. This isn't a perfect fix but at least
improves the situation.
2019-05-21 17:24:24 -04:00
9f45197a0b ui/nav-flash: improve conditional blinking on jump
Sometimes it wouldn't blink when the motion occurred within the same
window. This ensures more consistency.
2019-05-21 17:24:23 -04:00
0e2cbdf8f5 ui/nav-flash: trigger on switch-window 2019-05-21 03:42:12 -04:00
0041723a80 Make +nav-flash/blink-cursor unconditional
Since it is meant for interactive use
2019-05-21 01:24:55 -04:00
2214c3175e Minor tweaks across the board 2019-05-21 00:34:32 -04:00
754dd75624 Update highlight-indent-guides faces on focus-in
The faces may go out of sync if you spawn a tty frame via the server.
Updating it when you switch frames is a workaround for this.
2019-05-19 02:18:26 -04:00
928ec16242 ui/workspaces: remove unused function 2019-05-19 02:17:59 -04:00
dce3d0ddc6 Fix evil-alternate-buffer + persp-mode
Fixes an issue where evil-switch-to-windows-last-buffer would switch to
buffers outside the current workspace.
2019-05-19 02:17:59 -04:00
dba3ae5e4d Prevent nav-flash from firing too often
And trigger on better-jumper-post-jump-hook instead, so that non-evil
users can benefit from nav-flash in this case too.
2019-05-19 02:17:58 -04:00