Commit Graph

622 Commits

Author SHA1 Message Date
5c294f5b01 ui/pretty-code: :src_block_end = "»"
In some cases, emacs fontification struggles with whitespace symbols.
2018-12-05 22:11:54 -05:00
35170cb2e0 Merge pull request #1029 from amosbird/patch-8
Don't scan frames other than current in popup
2018-12-03 22:18:03 -05:00
d063fff8a1 Fixed +popup--kill-buffer visibility check
Now it checks all frames instead of only the current one.
2018-12-02 13:24:02 -05:00
3b67338b4a Don't scan frames other than current in popup
This accidentally reuses windows in other frames, especially when there are multiple compliation buffers.
2018-11-27 22:08:35 +08:00
876660c28f Revert #977
This width-workaround would simply toggle fci-mode on and off, every
time window-size-change-functions and window-configuration-change-hook
is triggered.
2018-11-01 00:05:12 -04:00
47a0a8c686 Merge pull request #977 from laishulu/feature/conditional-fci
turn off fci when window is narrow than fill column
2018-10-31 16:09:37 -04:00
0af32e0c52 ui/fci: conform to conventions; minor refactor 2018-10-31 16:07:22 -04:00
8085a55bcb ui/neotree: fix open/find-this-file commands #992
A not-so-recent update to projectile caused doom-project-root's
signature to change (it can now return nil, if not in a project). This
fixes +neotree/open and +neotree/find-this-file to account for this new
behavior, by resorting to default-directory in the absence of a project.
2018-10-31 14:45:51 -04:00
4063b8d14a ui/modeline: abbreviate $HOME in buffer id segment 2018-10-30 16:21:54 -04:00
1c5080315a turn off fci when window is narrow than fill column 2018-10-22 00:04:46 +08:00
97f8594a71 ui/modeline: refresh +modeline-buffer-state often
This fixes issues where the buffer's modified state isn't reflected
properly in the mode-line, at the expense of a little (but acceptable
loss of) efficiency.
2018-10-18 13:13:35 -04: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
e3a0ad0b33 set-pretty-symbols!: rename rest -> plist
A more sensibile name.
2018-10-16 17:32:41 -04:00
4e81605463 ui/doom: set load-theme hooks sooner
Allows users to remove them without after! blocks.
2018-10-16 02:49:21 -04:00
0bb06f052e Fix dashboard hiding files opened via emacsclient 2018-10-13 13:28:13 -04:00
765ca10a92 Fix set-pretty-symbols! with multiple modes
(set-pretty-symbols! '(c-mode c++-mode objc-mode) RULES*)

This fixes a logic bug that prevented RULES from applying to any but the
first mode in the list (e.g. only c-mode will be affected).
2018-10-11 16:06:25 -04:00
661632d55e ui/vc-gutter: fix git-gutter in tty Emacs
Use git-gutter-mode in tty Emacs, and git-gutter-fringe in GUI Emacs.
2018-10-06 20:44:25 -04:00
706da14ec9 ui/modeline: fix void-variable evil-visual-* errors
For non-evil users.
2018-10-06 20:44:22 -04:00
bc16ef5431 ui/tabbar: add tabbar-mode to doom-init-ui
Not that anybody should be using this module anyway...
2018-10-03 11:15:51 -04:00
f20cfd21c2 Add mouse-over info to modeline segments
Also extracts indentation style info from +modeline-encoding into new
+modeline-indent-style segment.
2018-10-03 02:33:18 -04:00
702e0a6159 ui/popup: fix typo in d8928d4a 2018-10-03 02:32:22 -04:00
d8928d4aab ui/popup: fix which-key vslot fix
Prevents which-key from "sharing" popups.

Reported by @mfiano
2018-10-03 01:26:59 -04:00
aaa21698e9 ui/pretty-code: don't error on non-existent symbol
Users may want to customize the symbol list entirely, rather than modify
in place.
2018-09-30 16:19:17 -04:00
6c5512896a ui/doom-modeline: fix stringp errors
Caused by old uses of doom-project-root. See 53fe7a1 for details.
2018-09-29 21:58:09 -04:00
e7fc1d3290 Fix wrong-type-arg: stringp, nocache errors
Fix old usage of doom-project-name and doom-project-root.
2018-09-28 23:49:18 -04:00
ccb04c43da ui/popup: refactor default rules
The vslots don't have to be so far from 0. Also makes compilation popups
bigger.
2018-09-28 21:13:52 -04:00
d9fb1c5ca6 ui/modeline: add support for indirect buffers
Indirect buffer support is still dodgy and needs work (some segments
don't update at all).
2018-09-28 21:13:28 -04:00
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
4ea4754162 Add commands for using bin/doom from inside Emacs
This is experimental. I'd eventually like users to be able to management
Doom from inside Emacs, if they desire. This may be the only way to have
a decent user experience on Windows, for that matter.

Also adds a popup rule for it.
2018-09-28 21:13:27 -04:00
d5f8ecdfce ui/treemacs: fix leader key in treemacs
This is an ugly hack and I should be ashamed.

Shame.

Shame.

Shame.

But alas, it shall do until general.el is in.

Fixes #860
2018-09-27 18:16:21 -04:00
74af5bde26 ui/modeline: fix buffer file path segment
To cope with changes upstream in the projectile package.
2018-09-22 13:15:12 -04:00
7acece3e0b Disable projectile mode-line segment
If either module module is active, this is just extra overhead.
2018-09-22 11:47:36 -04:00
77b5571ed9 ui/modeline: fix *invalid* in global-mode-string 2018-09-21 13:33:18 -04:00
02a5109c4f Comment on disabling fci-mode in org-mode 2018-09-20 22:28:39 -04:00
cc1c28a27c Fix dual windows when opening files via terminal #850 2018-09-20 15:01:28 -04:00
27e17ace67 Fix race condition in popup load
When compiling everything I got this on Emacs startup:
```
Debugger entered--Lisp error: (void-variable +popup--display-buffer-alist)
  (setq +popup--old-display-buffer-alist display-buffer-alist display-buffer-alist +popup--display-buffer-alist window--sides-inhibit-check t)
  (cond (+popup-mode (add-hook 'doom-escape-hook (function +popup|close-on-escape) t) (add-hook 'doom-cleanup-hook (function +popup|cleanup-rules)) (setq +popup--old-display-buffer-alist display-buffer-alist display-buffer-alist +popup--display-buffer-alist window--sides-inhibit-check t) (let ((--dolist-tail-- +popup-window-parameters)) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (setq window-persistent-parameters (cons (cons prop 'writable) window-persistent-parameters)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (t (remove-hook 'doom-escape-hook (function +popup|close-on-escape)) (remove-hook 'doom-cleanup-hook (function +popup|cleanup-rules)) (setq display-buffer-alist +popup--old-display-buffer-alist window--sides-inhibit-check nil) (+popup|cleanup-rules) (let ((--dolist-tail-- +popup-window-parameters)) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (delq (assq prop window-persistent-parameters) window-persistent-parameters) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
  (let ((last-message (current-message))) (setq-default +popup-mode (if (eq arg 'toggle) (not (default-value '+popup-mode)) (> (prefix-numeric-value arg) 0))) (cond (+popup-mode (add-hook 'doom-escape-hook (function +popup|close-on-escape) t) (add-hook 'doom-cleanup-hook (function +popup|cleanup-rules)) (setq +popup--old-display-buffer-alist display-buffer-alist display-buffer-alist +popup--display-buffer-alist window--sides-inhibit-check t) (let ((--dolist-tail-- +popup-window-parameters)) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (setq window-persistent-parameters (cons (cons prop 'writable) window-persistent-parameters)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (t (remove-hook 'doom-escape-hook (function +popup|close-on-escape)) (remove-hook 'doom-cleanup-hook (function +popup|cleanup-rules)) (setq display-buffer-alist +popup--old-display-buffer-alist window--sides-inhibit-check nil) (+popup|cleanup-rules) (let ((--dolist-tail-- +popup-window-parameters)) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (delq (assq prop window-persistent-parameters) window-persistent-parameters) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (run-hooks '+popup-mode-hook (if (default-value '+popup-mode) '+popup-mode-on-hook '+popup-mode-off-hook)) (if (called-interactively-p 'any) (progn (customize-mark-as-set '+popup-mode) (if (and (current-message) (not (equal last-message (current-message)))) nil (let ((local "")) (message "+Popup mode %sabled%s" (if (default-value '+popup-mode) "en" "dis") local))))))
  +popup-mode()
  doom-try-run-hook(+popup-mode)
  run-hook-wrapped(doom-try-run-hook +popup-mode)
  doom|init-ui()
  run-hooks(emacs-startup-hook term-setup-hook)
  #f(compiled-function () #<bytecode 0x46c615>)()
  normal-top-level()
```

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-09-19 21:43:56 +01:00
b76a09539c Fix helm TAB completion from org-insert-link #897 #829
This is a tricky issue and a tricky fix. See the comments in the commit
for an explanation.
2018-09-18 21:44:59 -04:00
0c39e73a1e Refactor/reformat core-ui
+ Move minibuffer fringe disabler to ui/doom
+ Disable blink-cursor-mode (too distracting, causes other issues e.g.
  #892)
2018-09-18 15:19:50 -04:00
d332f00ca7 ui/doom-modeline: fix evil visual block indicator #895 2018-09-18 15:19:50 -04:00
a1440f8d66 Fix meta keybinds in popup in tty Emacs #869
Meta keys map to ESC in tty Emacs.
2018-09-13 19:15:16 -04:00
0a3334a1f6 ui/modeline: refactor +modeline-encoding segment 2018-09-13 19:15:15 -04:00
947130df8b Improve +fci|disable-when-company-activates 2018-09-10 17:56:09 +08:00
3128b830f9 ui/modeline: +modeline-height = 25
+2 to default height
2018-09-09 09:58:23 -04:00
0b350f6ea4 ui/popup: refactor +popup/raise
Improves its error tolerance and gives it a window argument.
2018-09-09 09:58:22 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
50fdaa0ed5 Silence "unbound key" spam on mouse-1 in dashboard 2018-09-09 09:58:19 -04:00
786ab9e7b5 ui/modeline: show UTF-8 for prefer-utf-8 encoding 2018-09-09 09:58:14 -04:00
f8f9144f08 ui/modeline: add indent type+width to modeline
Also, display nothing for file encoding if encoding is undecided.
2018-09-03 04:05:35 +02:00
5e25cfd6a7 Fix delete-other-windows in popups #858
Originally, calling delete-other-windows from a popup window would kill
only popup windows. This has been corrected to raise the popup, *then*
delete other windows.

As if you'd done `M-x +popup/raise` then `M-x delete-other-windows`
2018-09-02 20:38:36 +02:00
3a23ff56cd General formatting & minor refactors 2018-09-02 17:20:19 +02:00