Commit graph

1081 commits

Author SHA1 Message Date
Henrik Lissner
8c41093fae
ui/doom: update doom-themes config for treemacs/neotree 2019-07-22 02:30:38 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
dbcd2f7624
Move treemacs-last-error-persist-file out of ~/.emacs.d
Git off my lawn.
2019-07-11 17:22:27 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
2f86c01170
Add default popup rule for M-x calc 2019-07-09 19:55:37 +02:00
Henrik Lissner
c5cd29ef74
ui/workspaces: refactor restoration of indirect buffers 2019-07-08 21:21:02 +02:00
Henrik Lissner
53d1bf6b58
Refactor +popup/other 2019-06-30 18:12:16 +02:00
Henrik Lissner
20b397362b
Don't auto-kill term/vterm/eshell dedicated popups 2019-06-27 01:27:40 +02:00
Henrik Lissner
525cba3f3b
ui/workspaces: fix +workspaces|init for daemon 2019-06-26 19:17:56 +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
f4ef25bb12
Don't delete-other-windows during org-agenda popup 2019-06-26 14:31:06 +02:00
Henrik Lissner
b5c5b7f10d
Move posframe+persp-mode fix to ui/workspaces 2019-06-26 14:31:06 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
2e96fce2e0
ui/modeline: remove obsolete advice (fix #1372) 2019-06-19 11:37:27 +02:00
Henrik Lissner
f2d7c5625d
Revise comments & docstring 2019-06-18 14:43:05 +02:00
Henrik Lissner
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
Henrik Lissner
84fd744e3f
Minor, general refactor & comment revision 2019-06-14 11:08:59 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
74a4700486
ui/vc-gutter: conform functions to conventions
Since the module was renamed...
2019-06-12 20:24:11 +02:00
Henrik Lissner
77a7b76108
ui/vc-gutter: respect git-gutter:disabled-modes #1482 2019-06-12 09:32:55 +02:00
Henrik Lissner
a1c1d8818a
Fix #1456: handle remote PWDs in dashboard
Otherwise, invisible TRAMP authentication prompts would hang Emacs.
2019-06-11 16:21:37 +02:00
Henrik Lissner
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
Henrik Lissner
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
Siddharth Shekar
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
Andrew Whatson
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
Henrik Lissner
6dcbaef570
ui/indent-guides: don't omit first level of guides 2019-05-29 23:46:18 -04:00
Henrik Lissner
febeed2526
ui/nav-flash: blink on window switch conditionally
The alternative is too aggressive.
2019-05-22 17:11:24 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
0e2cbdf8f5
ui/nav-flash: trigger on switch-window 2019-05-21 03:42:12 -04:00
Henrik Lissner
0041723a80
Make +nav-flash/blink-cursor unconditional
Since it is meant for interactive use
2019-05-21 01:24:55 -04:00
Henrik Lissner
2214c3175e
Minor tweaks across the board 2019-05-21 00:34:32 -04:00
Henrik Lissner
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
Henrik Lissner
928ec16242
ui/workspaces: remove unused function 2019-05-19 02:17:59 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
3240238a18
tools/vterm: improve UI/UX
- Don't prompt about processes when killing buffer
- Hide modeline in vterm buffers (doesn't do anything useful and would
  be consistent with settings for eshell and term modules).
- Refactor +vterm/open & +vterm/open-popup
- Add Emacs window redraw hack to force vterm to redraw, fixing
  artefacting in some edge cases.
- Fix ansi-color-names-vector when solaire-mode is present, otherwise
  you get a mismatched background in vterm (and other terms).
2019-05-17 01:58:42 -04:00
Henrik Lissner
016ba359e5
ui/tabbar: rewrite
Not that you should use this module. It is now more of an experiment to
get more conventional tab-like functionality in Emacs, without the help
of tabbar-mode, which doesn't actually do what we want.

Over time I may improve this (or not).
2019-05-15 22:29:03 -04:00
Henrik Lissner
a8300a53f1
ui/popup: allow ESC to close eval result popups 2019-05-15 20:29:46 -04:00
Henrik Lissner
dd4e265a49
ui/popup: merge eval output popup rules 2019-05-15 15:25:03 -04:00
Henrik Lissner
a22c035815
ui/popup: ensure existing buffers are reused
This resolves an issue where the popup manager would open another popup
if a previous one had been raised. The popup manager now delegates to
the existing buffer if it already exists (without resizing it).
2019-05-15 15:22:09 -04:00
Henrik Lissner
c549091ce5
ui/popup: polish default rules
- Establish popup naming convention:
  - *doom:name* -> a temporary editing buffer (requires interaction)
  - *doom name* -> a transient buffer (no interaction required)
2019-05-15 15:22:09 -04:00
Henrik Lissner
4dbf8f206b
ui/doom-dashboard: refactor & optimize
Potentially addresses crashing issues caused by the dashboard.

Relevant to #1170
2019-05-15 15:22:08 -04:00
Henrik Lissner
0a0def6a53
ui/modeline: update README
To reflect our adoption of the doom-modeline package. Still a WIP, but
is at least more correct now.

Renders #1412 unnecessary.
2019-05-13 19:34:44 -04:00