Commit graph

1263 commits

Author SHA1 Message Date
Henrik Lissner
115d1990d4
ui/treemacs: remove hl-line->region face remapping
This causes more issues that solves. Perhaps something can be done
upstream to make this line highlight brighter.

Possibly addresses #957
2019-03-04 04:57:07 -05:00
Henrik Lissner
7097739994
ui/vc-gutter: remove commented diff-hl config 2019-03-04 04:57:07 -05:00
Henrik Lissner
0534d85c54
ui/treemacs: refactor
Treemacs enables treemacs-filewatch-mode and treemacs-git-mode itself.
Also removes settings that are the same as the defaults.
2019-03-04 04:57:07 -05:00
Henrik Lissner
12ddc3c360
ui/modeline: add indent segment 2019-03-04 04:57:06 -05:00
Henrik Lissner
cc1aad8f2e
ui/modeline: fix mixed up autodef aliases 2019-03-02 13:05:13 -05:00
Henrik Lissner
9f1a0ee81e
ui/doom: remove mixed-pitch-mode compat hack
Made obsolete by changes upstream in solaire-mode.
2019-03-02 12:48:08 -05:00
Henrik Lissner
7c9e96da87
General module refactor 2019-03-02 02:04:11 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
735ec58b36
ui/doom-dashboard: show command at point in echo-area 2019-03-02 01:34:15 -05:00
Henrik Lissner
8832737671
Adopt seagle0128/doom-modeline for :ui modeline
And remove obsolete :ui doom-modeline module.

Relevant to: #136, #921
2019-03-02 01:34:14 -05:00
Henrik Lissner
c85565cfef
ui/modeline: add multiple cursors segment 2019-02-26 23:02:13 -05:00
Henrik Lissner
9b7d95f43a
Remove doom-cleanup-hook & doom/cleanup-session
These weren't reliable, often times buggy or overzealous about killing
buffers and processes. Best to do it manually or come up with a better
solution.
2019-02-26 22:57:02 -05:00
Henrik Lissner
c82faf7f10
General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
Henrik Lissner
adfc06f3dd
Add no-other-window in popup criteria
This allows +popup-window-p to recognize popup windows created by
plugins (like treemacs).
2019-02-19 01:29:03 -05:00
Henrik Lissner
d6d67ac568
Force ace-window not to ignore treemacs #1177 2019-02-18 20:17:19 -05:00
Henrik Lissner
93132e43c1
Fix window--display-buffer advice #1173
Forgot to have the :filter-return advice return the window (whoops!)
2019-02-16 01:16:09 -05:00
Henrik Lissner
c5cd97d3cc
Fix breaking change in window--display-buffer
This change is present in later builds of Emacs 27, where
window--display-buffer no longer has a 5th argument.
2019-02-15 19:53:15 -05:00
Henrik Lissner
c033bfaca2
Fix mixed-pitch affecting all buffers
Both solaire-mode and mixed-pitch-mode use face-remap to do their thang.
We ensure the order by ensuring activation order.
2019-02-12 00:37:00 -05:00
Henrik Lissner
3fd1548da5
Set treemacs--last-error-persist-file later #1151
Because treemacs--last-error-persist-file is defined with defconst, its
default value will overwrite our custom one once the
treemacs-persistence package is loaded.
2019-02-03 18:54:13 -05:00
Henrik Lissner
4132be4208
org-agenda-window-setup = popup-window
This is a custom setting that allows org agenda windows to be managed by
Doom's popup manager.
2019-02-03 18:39:29 -05:00
Ting Zhou
e00ea2c306 ui/treemacs: assgin treemacs--last-error-persist-file 2019-01-23 14:18:31 -08:00
Henrik Lissner
4b2dbe42a5
Fix popup :slot property
It was broken by the new split-window parameter set on popup windows.
2019-01-08 21:49:43 -05:00
Henrik Lissner
fbb0297eb1
ui/treemacs: remove leader key fix
These aren't necessary now that the leader keymap has high precedence.
2019-01-08 20:40:26 -05:00
Henrik Lissner
30eaf8fd03
Fix "cannot split parent or side window" errors
Hopefully addresses a common issue where helm actions will operate on
the wrong window (a popup, typically, which is a dedicated side window;
Emacs doesn't let you split side windows).

This comes with a side effect: trying to split a popup will cause a
non-popup window nearby to be split instead.

Popups really aren't supposed to be split (interactively) in any case.
2019-01-08 20:38:17 -05:00
Henrik Lissner
b56639e31b
Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
6a03b37dd3
General refactor for comments & docstrings 2019-01-05 15:20:49 -05:00
Henrik Lissner
7844115561
ui/modeline: don't show encoding if UTF-8
It's only important if the encoding is something we don't expect.
2019-01-03 12:56:01 -05:00
Henrik Lissner
d7af119c0c
ui/modeline: reformat README (WIP) 2019-01-03 02:01:57 -05:00
fydai
2107e3caaf
ui/vc-gutter: switch git-gutter order
This change checks whether a file is remote before checking whether it's a version controlled repo, rather than the other way around. Gives a slight speed improvement to Tramp.
2018-12-30 04:16:40 -08:00
Henrik Lissner
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
Henrik Lissner
6992e27884
ui/doom: use solaire-global-mode #1070 2018-12-26 17:36:52 -05:00
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Henrik Lissner
5331a28533
set-pretty-symbols!: fix void-variable mode error
Occurs when unsetting pretty symbols for a mode
with (set-pretty-symbols! 'some-mode nil), because of a forgotten loop
and let-var.
2018-12-22 04:25:15 -05:00
Henrik Lissner
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
Henrik Lissner
1610cd32b2
ui/popup: respect org-src-window-setup
Added a new value for org-src-window-setup: 'popup-window

Other values (like 'other-window) will revert to org's old behavior.

Needs more testing.
2018-12-06 17:52:12 -05:00
Henrik Lissner
5c14fb42e0
Add +popup/diagnose for debugging popup rules 2018-12-06 17:51:40 -05:00
Henrik Lissner
b41e38dcf4
Make RET respect popups in Buffer-menu 2018-12-06 17:50:32 -05:00
Henrik Lissner
745bd3238c
Fix delete-other-windows from inside popups
Occasionally, a window will lose its popup status, but not its special
window parameters, forcing non-popups to be treated like popups when
delete-other-windows is called.
2018-12-06 17:45:53 -05:00
Aria
a11e78d710 Change src_block_end to left arrows 2018-12-06 17:05:55 +11:00
Henrik Lissner
693711bf9c ui/vc-gutter: git-gutter:window-width = 1
Hopefully fixes "jumpy gutter" when refreshing git-gutter in tty Emacs.
2018-12-05 22:11:54 -05:00
Henrik Lissner
5c294f5b01 ui/pretty-code: :src_block_end = "»"
In some cases, emacs fontification struggles with whitespace symbols.
2018-12-05 22:11:54 -05:00
Henrik Lissner
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
Elijah Malaby
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
Amos Bird
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
0af32e0c52
ui/fci: conform to conventions; minor refactor 2018-10-31 16:07:22 -04:00
Henrik Lissner
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
Henrik Lissner
4063b8d14a
ui/modeline: abbreviate $HOME in buffer id segment 2018-10-30 16:21:54 -04:00