Commit Graph

637 Commits

Author SHA1 Message Date
Lewis Russell 3c54f80ead Change default topdelete symbol to upperscore 2020-11-09 16:58:28 +00:00
Lewis Russell 55e5445b54 Make sure git-dir is absolute 2020-11-05 17:19:02 +00:00
Lewis Russell dd984ab091 Fix typo 2020-11-03 14:04:44 +00:00
Lewis Russell 0629c2d221 Increate update debounce from 50ms to 100ms 2020-11-03 13:33:18 +00:00
Lewis Russell 36f1b519ef Add \n to buf contents passed to git-diff
Attempts to fix #3
2020-11-03 13:29:53 +00:00
Lewis Russell 1ee577246b Revert "Add config.debounce"
This reverts commit 7fc3174c16.
2020-11-03 13:25:19 +00:00
Lewis Russell e3b66ae5a1 Add config.debounce
Increase default from 50ms to 100ms
2020-11-03 12:39:15 +00:00
Lewis Russell 104ead72c1 Always return if cache is nil 2020-11-03 12:15:33 +00:00
Lewis Russell 193906990b Move debug to separate module
Output to log file instead of nvim output
2020-11-03 12:12:22 +00:00
Lewis Russell e3903ae708 Pass buffer contents via stding to git-diff
Avoids having to manage an extra temp file
2020-11-03 12:01:33 +00:00
Lewis Russell e93611397a Fix error when jumping with no diffs 2020-11-01 15:35:22 +00:00
Lewis Russell 7dadca505b Allow sign priority to be configurable 2020-10-31 18:39:17 +00:00
Lewis Russell cc099d6b29 Be more conservative on updates triggered from the index
When the index changes, check whether the object of the staged file has
also changed before running another update. If the object hasn't changed
then we don't need to update.

Whilst we are at it also collect the mode bits from the index and use
these when staging hunks instead of assuming them.
2020-10-31 18:32:50 +00:00
Lewis Russell 185f9e7467 Reduce sign priority to 6 2020-10-30 20:57:03 +00:00
Lewis Russell e243005023 Fix typo in args 2020-10-28 21:37:01 +00:00
Lewis Russell 28d6bf5064 Fix cache issue 2020-10-28 21:31:13 +00:00
Lewis Russell 371a838a86 Fix a lot more issues
- Detect buffers better
- Use cache more
- Support git submodules

Change-Id: Iacae94de7efff5757f98a4eab9ad68448076c427
2020-10-28 15:51:07 +00:00
Lewis Russell f15e82a68f Respect algorithm in diffopt
Signs should be consistent when running :diffthis

Change-Id: I2ac6bdb77bba12fe48e897c6dd1e9fb27f6ee249
2020-10-28 15:51:04 +00:00
Lewis Russell 37227fd572 Improved efficiency
- Throttle the attach function. Was being triggered twice on the first
buffer for whatever reason

- Cache the staged content instead of updating on every update

- Make sure we use cache whenever we can

- Removed config.watch_index.enabled. Will be too much work to support
it.

- Add more debug info

Change-Id: I7acefac36d5589cf97b749ad42aab4a7131ef71d
2020-10-27 17:10:04 +00:00
Lewis Russell 99d11eb76f Remove async call to reset hunk 2020-10-25 21:38:58 +00:00
Lewis Russell 83a85d430d Add support for repeat.vim 2020-10-25 21:36:26 +00:00
Lewis Russell fdc7bb60a0 Debounce trailing instead of throttle leading 2020-10-25 13:14:52 +00:00
Lewis Russell 35cb687f04 Remove get_hunk mapping 2020-10-25 01:15:20 +01:00
Lewis Russell ae695a803c Add ability to reset hunks 2020-10-25 01:13:09 +01:00
Lewis Russell 6a51cc061a Add undoing partial stages 2020-10-24 18:14:37 +01:00
Lewis Russell d8e5305d88 Use error code when getting index blob 2020-10-24 16:34:19 +01:00
Lewis Russell 1e7e61f613 Set keymaps globally
Don't run diff if we cannot get staged file
2020-10-24 15:41:03 +01:00
Lewis Russell 916f702c73 Gracefully stop index watcher 2020-10-24 15:01:02 +01:00
Lewis Russell 80ae700117 Change default highlight groups to Diff* 2020-10-22 18:19:12 +01:00
Lewis Russell d775654221 Lint all files through luacheck 2020-10-22 17:51:41 +01:00
Lewis Russell 9d03acf0b3 Add status line info to README
Changed b:git_signs_* vars to b:gitsigns_*
2020-10-22 17:11:11 +01:00
Lewis Russell 1810149ef6 Clean up messaging
Add config.debug_mode to enable debug messages
2020-10-22 16:59:57 +01:00
Lewis Russell 6fab7b043d Tweak async interface 2020-10-22 16:38:58 +01:00
Lewis Russell 143fe80212 Handle errors better
+ Refactor
2020-10-20 12:06:33 +01:00
Lewis Russell 0677a41fb7 Throttle the update function 2020-10-18 14:11:25 +01:00
Lewis Russell f0a7628917 This and that 2020-10-18 13:23:55 +01:00
Lewis Russell 9346b2f7a7 Init 2020-10-18 11:19:06 +01:00