Commit Graph

181 Commits

Author SHA1 Message Date
e431dbc138 fix(doom-dashboard,workspaces): module init order
Change (and simplify) the load order of Doom's dashboard and persp-mode
so that the dashboard always initializes later. This and 0ab6aba should
fix #5643.

Fix #5643
Ref 0ab6aba056
2021-10-18 01:15:20 +02:00
dd1f7713ea Fix 'invalid face attribute :background' warnings
And 'invalid face attribute nil' warnings too.
2021-05-30 12:20:58 -04:00
6e296f3da2 Reload dashboard when loading theme
To fix dashboard banner background mismatches due to solaire-mode.
2021-05-22 19:57:41 -04:00
b903930f2d ui/doom-dashboard: only affect buffer-local fringe-indicator-alist 2021-05-01 02:46:08 -04:00
e80bd6da4a ui/dashboard: minor refactors 2021-04-13 18:54:48 -04:00
b859727f7a Never show hl-line in dashboard 2021-03-27 18:27:02 -04:00
5e8a668311 Fix empty dashboard on first daemon frame
Dashboard would be empty because +doom-dashboard-reload was never called
in daemon sessions (until you switch back to it).
2021-02-14 21:14:07 -05:00
f587630e17 Use module instead of package detection
Otherwise, the dashboard will break if the user has perspective.el
installed, instead of persp-mode.
2021-01-11 02:41:44 -05:00
1765dc8299 Correct ascii banner alignment
Closes #4289
2020-11-20 14:10:28 -05:00
86c2f05252 Refactor doom-dashboard-draw-ascii-banner-fn 2020-11-19 00:44:16 -05:00
befb2baeda Introduce +doom-dashboard-ascii-banner-fn setting 2020-11-15 09:49:30 -05:00
5018637091 ui/doom-dashboard: center bottom line of banner 2020-11-10 20:38:45 +01:00
de4532f979 ui/doom-dashboard: have 'last-project policy fall back to CWD
Normally, the dashboard assumes the default-directory = project root of
the last buffer you had open. This is to make it easy for you to recover
from closing the last buffer in your project and wondering how to get
back. However, if the last file wasn't in a valid project, the dashboard
assumes the directory of the last buffer that did, which can be jarring.

It will now assume the last buffer's CWD if it wasn't in a valid project
root.
2020-08-09 01:50:41 -04:00
e1fc2db751 Disable line numbers in dashboard
They look ugly when large margins are involved.
2020-07-26 14:03:45 -04:00
83b6f74d11 Minor refactors & reformatting 2020-03-27 21:39:27 -04:00
760aa50c44 ui/doom-dashboard: De-hardcode dashboard faces 2020-01-02 23:18:19 -05:00
f05f4d2b59 Replace search docs button w/ open docs on dashboard
It is more helpful to newcomers.
2019-12-29 16:34:21 -05:00
934e4fc06f ui/doom-dashboard: fix vertical padding #2251 2019-12-26 01:41:45 -05:00
0b4356a7d5 Fix 'search documentation' button on dashboard 2019-12-26 01:41:44 -05:00
8386c95fb1 ui/doom-dashboard: fix fix for #2219
What a fix
2019-12-21 03:30:44 -05:00
960f403e2e Fix misaligned dashboard on workspace switch #2219
Only occurs in daemon GUI frames, for some reason.
2019-12-21 01:49:10 -05:00
fbf9010c80 Log benchmark whether or not dashboard is enabled 2019-11-08 16:02:06 -05:00
c37bdf71d1 Demote "no more buttons" error to warning
If the shortmenu or buttons were disabled, this error would break the
dashboard (and Doom).

Mentioned in #2024
2019-11-08 16:02:06 -05:00
b1e8ee7175 Add 'Search Documentation' button to dashboard (#1955)
* Add an FAQ action to doom-dashboard

* Separate faq and user manual

This is necessary until I can dispatch properly the (file-exists-p)
conditions in the :action part of the variable.

The issue is that the value in :action needs to be a symbol (symbolp)
and the (if COND THEN ELSE) form does not match this.

* Use doom/help-search if (or faq.org manual.org)

Since the function searches through the (in-progress) manual and faq

* Remove :when condition from Search Documentation

This condition is unnecessary since doom/help-search now always at least
lists the modules from doom/help-modules
2019-10-26 04:15:32 -04:00
323e0adf45 Minor refactors & reformatting across the board 2019-10-17 01:47:58 -04:00
05f458a75b Disable benchmark in minibuffer if dashboard is enabled
Redundant; also, printing to minibuffer during startup is somewhat
expensive.
2019-10-06 02:28:44 -04:00
8766499b0d Fix some file permissions errors
Occurs when deferred packages are loaded while in an unreadable or
non-existent directory.
2019-08-27 00:05:12 -04:00
6c734ab039 ui/doom-dashboard: use fancy-splash-image variable 2019-08-23 01:56:44 -04:00
71d3eccec5 Fix missing dir separator in +doom-dashboard-banner-dir 2019-07-29 03:18:39 +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
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
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
a1c1d8818a Fix #1456: handle remote PWDs in dashboard
Otherwise, invisible TRAMP authentication prompts would hang Emacs.
2019-06-11 16:21:37 +02:00
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
6b69eaa397 Minor refactors across the board 2019-04-26 17:42:44 -04:00
12a3adab2c ui/doom-dashboard: fix evil motion keys #1365
Because :feature evil was moved to :editor evil, it is initialized
later, meaning evil map! keybinds prior to that module loading are
ignored. There's no harm in generalizing these remaps, however.
2019-04-26 17:29:54 -04:00
f934f38627 ui/doom-dashboard: general refactor
Hopefully addresses #1170
2019-04-08 22:58:10 -04:00
1081095a64 Initialize dashboard later on doom-init-ui-hook 2019-03-15 16:26:48 +10:00
de2d681567 Initialize dashboard on doom-init-ui-hook 2019-03-15 01:36:57 -04:00
910bfc41cc Initialize dashboard later in window-setup-hook
Since bb3f027c moved `projectile-mode` into `doom-init-ui-hook`,
projectile was getting initialized after the dashboard.  This means for
non-evil users, the `C-c p p` binding is not shown, because it's not yet
loaded.
2019-03-15 13:51:22 +10:00
54d1c0dd56 Minor, general refactors 2019-03-09 03:42:55 -05:00
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
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
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
735ec58b36 ui/doom-dashboard: show command at point in echo-area 2019-03-02 01:34:15 -05:00
63a224f0e8 Fix wrong which-key labels & leader key precedence
This changes how leader keys are bound, to fix an issue where the wrong
which-key label was assigned to the wrong keys, and cases where the
leader key was being shadowed by other minor mode mappings.

Unfortunately, this new method adds 10-20% to startup times. I'll
address this in a future patch. For now, correctness is more important.

Also fixes dashboard keybind detection.
2018-12-27 00:08:47 -05:00
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
5a442932d7 ui/doom-dashboard: reload dashboard in daemon frames
Fixes an issue where creating a graphical frame from the daemon can
cause the non-GUI version of the dashboard to show.
2018-10-17 14:49:35 -04:00
0bb06f052e Fix dashboard hiding files opened via emacsclient 2018-10-13 13:28:13 -04:00
cc1c28a27c Fix dual windows when opening files via terminal #850 2018-09-20 15:01:28 -04:00