Commit graph

115 commits

Author SHA1 Message Date
Henrik Lissner
951b2be7d1
Enable magit-todos-mode globally
Rather than treat it like it's a minor mode.
2019-02-03 18:39:34 -05:00
Oleksii Filonenko
5b44d3fa61
Set forge-database-file in doom-etc-dir
Suggested by @luigy
2019-01-26 12:18:31 +02:00
Henrik Lissner
fa5bebc13a
tools/magit: fix ivy's sorting with magit #1131
By default, magit-completing-read-function is set to
magit-builtin-completing-read, which already includes ivy support.
2019-01-23 14:43:01 -05:00
Henrik Lissner
bd8f33df52
tools/magit: :when+not => :unless
Minor refactor
2019-01-21 22:27:03 -05:00
Oleksii Filonenko
5287c48092
Move Forge binding to config/default/+evil-bindings 2019-01-11 15:00:24 +02:00
Oleksii Filonenko
b796ad76cc
Move Forge leader binding to magit/+evil-bindings 2019-01-10 13:15:54 +02:00
Oleksii Filonenko
0d3c8e3d9a
Fix def-package for magit/forge
- add :after magit
- fix space position after "Forge"
2019-01-10 13:09:14 +02:00
Adrian Parvin D. Ouano
7c368d4f9a
Add configuration for magit forge 2019-01-04 09:42:56 +08:00
Henrik Lissner
451c16b8ee
Revise :after-call & :defer-incrementally comments
Now implicitly adds the current package to :defer-incrementally's list
of packages.
2018-12-23 00:25:51 -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
67fa4b31ea
Restore =S gpg-sign option for magit
Curiously, interactive rebasing seems to fail to sign commits without
this option present in some cases.
2018-12-07 18:00:17 -05:00
Aria
fe8b17d6da move projectile fd out of magit.el
lol
2018-12-04 20:09:44 +11:00
Aria
e7141d2c96 use --type f with fd
will show folders otherwise
2018-12-02 00:06:55 +11:00
Aria
c3dc660b1b Use fd for populating projectile cache 2018-11-29 23:22:07 +11:00
Henrik Lissner
9bb5b4ef72
tools/magit: +magit-hub-features = t
Since magithub is "disabled" by default, if enabled it might be
confusing that its features aren't all enabled (which is magithub's
default behavior).
2018-10-17 00:21:18 -04:00
Sean Farley
8efc5828ea magit: only implement leader key logic when doom-leader-key is non-nil 2018-09-28 16:58:26 -07:00
Henrik Lissner
fcd1e913c5
tools/magit: update vc on +magit/quit
Instead of magit-post-refresh-hook, which fires much more frequently.
Updating vc across all buffers is expensive, so let's only do it when we
quit magit.

Warning: this may make quitting magit expensive when you have many
buffers open. Still searching for a better solution.
2018-09-26 12:10:00 -04:00
Henrik Lissner
b653039535
Add :defer-incrementally use-package keyword 2018-09-20 10:42:45 -04:00
Henrik Lissner
b7be38b2a9
New incremental lazy-loading at startup
This is for loading large packages (like org and magit) quietly in the
background during idle time. It is already set up to incrementally load
org and magit.

This is still experimental, however. the idle timers may need to be
tweaked.
2018-09-18 11:42:35 -04:00
Henrik Lissner
c37e3a1b80
tools/magit: fix hijacked leader key in magit-diff-mode 2018-09-13 19:15:16 -04:00
Henrik Lissner
da2a8b1063
tools/magit: don't mark process buffers as real
Otherwise, kill-this-buffer may switch to them.
2018-09-09 09:58:22 -04:00
Henrik Lissner
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
Henrik Lissner
3a23ff56cd
General formatting & minor refactors 2018-09-02 17:20:19 +02:00
啸傲居士
79cbae56b6 add shortcut to "magit-gitflow-popup" with '%' in magit-mode 2018-09-01 01:56:12 +08:00
Henrik Lissner
2b560a6a0e
General & minor refactoring 2018-08-28 13:36:44 +02:00
Henrik Lissner
641cef9848
Refresh vc when magit refreshes #826
Magit does not inform vc that changes have occurred to open buffers.
This fixes that (and indirectly fixes branch display in the modeline).
2018-08-23 17:09:59 +02:00
Henrik Lissner
2cc5d223fe
Rewrite how magit windows/popups are managed
The old policy was to invoke magit in fullscreen, but in practice, I've
found myself wanting to peek at other buffers (maybe even notes) while I
manage my project in version control.

So this change introduces two big changes and one fix:

+ Instead of a full-frame policy, we use full-column. e.g. Invoking
  magit-status will take up a full column of windows (and will restore
  them when you quit).
+ Popups are displayed below the current window if called from a magit
  buffer, otherwise as a popup at the bottom of the frame.
+ Fixes popups opening in a random window if called from a magit buffer
  in a popup.

This is only a start and needs more testing.
2018-08-13 21:47:56 +02:00
Henrik Lissner
cb7e471c90
General reformatting & comment revision/cleanup 2018-07-29 19:31:33 +02:00
Henrik Lissner
d094162d31
Refactor how git-timemachine loads magit-blame
Loading magit-blame immediately after git-timemachine is premature, only
one command uses magit-blame (git-timemachine-blame), so we defer it
until that command is called (also, it makes more sense to be in the
emacs/vc module, than tools/magit).
2018-07-29 17:42:00 +02:00
Henrik Lissner
e3dc3a6376
Shut up magit-todos-mode complaining about jT
I unbound it, stop complaining about it!
2018-07-29 17:41:59 +02:00
Henrik Lissner
6d0b274774
Simplify magit-todos-mode startup 2018-07-17 18:29:43 +02:00
Henrik Lissner
eddac86824
tools/magit: add magit-todos package 2018-07-12 18:49:13 +02:00
Henrik Lissner
4941e327f4
General refactor for readability
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
2018-07-09 15:33:31 +02:00
Henrik Lissner
3443cd870a
Disable magit-auto-revert-mode
Because we already use global-auto-revert-mode, but because it's lazy
loaded, the magit-autorevert package may not notice, and will enable
magit-auto-revert-mode anyway.
2018-07-06 13:39:42 +02:00
Henrik Lissner
156d717042
Restore zz in magit buffers 2018-06-30 13:21:24 +02:00
Henrik Lissner
ca2c8b5a45
Minor refactor, across the board
Do you see the board? Now look at the other side. That's how far this
refactor extends.

Yes.
2018-06-18 15:02:24 +02:00
Henrik Lissner
6808c46b58
💥 Change set-popup-rule! usage
Now accepts a flat plist of all its former parameters, including new
:parameters and :actions properties to increase your control over the
fate of your windows.

The old usage of set-popup-rule! is deprecated and may not work right!

The :ui popup module has also seen a major refactor to improve
efficiency and load times.

Sorry! This is the last "big" change before 2.1!
2018-06-18 02:34:16 +02:00
Henrik Lissner
233a1f6469
evil-magit-use-z-for-folds = t
And remove old meta key fold commands. Stashing commands are available
through Z, instead.
2018-06-17 14:50:58 +02:00
Henrik Lissner
51d49639f6
Change M-k/M-j keys to gk/gj in magit-rebase
Avoid meta keys where possible.
2018-06-17 14:22:29 +02:00
Henrik Lissner
709c708376
Open magit-popup is a side window
Instead of in a split below the current window.
2018-06-16 14:38:06 +02:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
Henrik Lissner
87ccdecd46
Autoload magit-file-delete 2018-06-11 01:06:41 +02:00
Henrik Lissner
85a0c9efc9
New default display-buffer handler for magit
+magit-display-buffer-fullscreen is a more sophisticated (albeit
experimental) replacement for magit-display-buffer-fullframe-status-v1,
which fullscreens magit, but will also:

a) Keep the status window visible
b) Treat magit buffers not opened from magit-status as popups
2018-06-07 02:51:45 +02:00
Henrik Lissner
b26bbd4762
Fix args-out-of-range in enable-minor-mode-maybe
Caused by trying to use out-of-scope match data.
2018-06-07 02:51:03 +02:00
Aria Edmonds
13413a72e8
tools/magit: Show word-granularity on chosen hunk
This really seems like it should be a default, it's so handy to get
better diffs, sort of like how github does it. if set to 'all then it'll
show on all of them, but I think t is good enough.
2018-06-06 18:08:02 +10:00
Henrik Lissner
d20ffca78d
tools/magit: minor refactor/reformatting 2018-06-02 10:56:04 +02:00
Henrik Lissner
1dd4076f8d
Handle magit windows w/ fullframe-status-v1
This new default was chosen to keep magit consistent with fullscreen
:app workflows (which work very similarly). It is also more predictable
than the default method.
2018-06-02 10:54:30 +02:00
Henrik Lissner
1ffdf616e8
Hide mode-line in magit windows (experimental) 2018-06-02 10:54:12 +02:00
Henrik Lissner
6d218fc5a0
Consider magit buffers real
So they can be switched to if buried
2018-06-02 10:53:51 +02:00
Henrik Lissner
bab530ea2e
Revert +hub flag, but disable magithub by default
Must be enabled on a per-project basis. You can change this behavior by
setting +magit-hub-enabled-by-default to non-nil (before magit is
loaded).

Magithub has been made opt-in because:

1. Magithub is imposing, asking the user for a token, especially for
   users who don't use github (much or at all), but may occasionally
   have a project with a github remote.
2. magithub is really slow on first load for medium-to-large repos.
3. It's really easy to enable it through the magithub popup (H C e).
   magithub.enabled is saved into the project's .git/config file, so the
   setting will persist.

Also added a docstring to +magit-hub-features
2018-06-01 11:13:37 +02:00