Lewis Russell
605166b6f6
Add get_hunks()
...
Resolves #242
2021-08-03 18:44:54 +01:00
Lewis Russell
a50bf388be
test: Make all tests run with ext_messages
2021-08-02 11:37:52 +01:00
Lewis Russell
dfc49f8be2
debug: Add trigger info to attach()
2021-08-02 11:30:00 +01:00
Lewis Russell
fe084521ac
Disable during vimgrep
...
Fixes #284
2021-08-02 11:10:32 +01:00
Lewis Russell
a272a8df25
test: Avoid using screen:expect and count signs instead
2021-06-23 16:57:42 +01:00
Lewis Russell
d22de18f9d
Rework testsuite
...
- Make tests more asyn friendly and remove most of the magic sleeps
- Break up into multiple files
- Bypass cmake
2021-06-23 11:41:48 +01:00
Lewis Russell
3b303ecba3
Update after change_base
2021-06-19 16:30:56 +01:00
Lewis Russell
912df11b46
feat: Add config.on_attach()
...
- Callback to set keymaps (instead of config.keymaps) and to control
whether to attach to a buffer.
- Documented how extended table configuation fields work.
- Removed non-buffer mappings and `buffer=true` from the default.
Resolves #155
2021-05-30 16:35:14 +01:00
Lewis Russell
6f9ffb94b4
Refactor gitsigns.tl
...
- Break into separate files
- Should slightly improve startup time.
- Removed update() from public API
2021-05-29 11:23:11 +01:00
Lewis Russell
c00f5f26fd
Added diffthis()
...
Analogous to fugitives :Gvdiffsplit, see :help gitsigns.diffthis()
Resolves #14
2021-05-27 14:34:44 +01:00
Lewis Russell
80cb1dc5ff
Detect when file is in a custom git dir
...
Fixes #193
2021-05-17 11:42:51 +01:00
Lewis Russell
dc0f6d895b
Add config.attach_to_untracked
...
Resolves #68
2021-04-24 16:59:51 +01:00
Lewis Russell
d30167b9c5
Don't place signs if all sign attrs are disabled
...
Fixes #163
2021-04-24 16:35:36 +01:00
Lewis Russell
adcc3cd927
Show correct signs on fugitive revision buffers
...
Fixes #143
2021-04-14 13:34:30 +01:00
Lewis Russell
b5222fa439
Refactor git commands to be more OOP (take 2)
2021-04-10 15:05:29 +01:00
Lewis Russell
f11dc80ec4
Revert "Refactor git commands to be more OOP"
...
This reverts commit 718d61b712
.
2021-04-10 09:34:31 +01:00
Lewis Russell
dbd4c8a87d
Refactor git commands to be more OOP
2021-04-10 00:17:19 +01:00
Tomáš Kallup
618601d2dc
Implemented stage_buffer
and reset_buffer_index
...
This allow users to run `lua require"gitsigns".stage_buffer()` to stage
all changes in a buffer and `lua require"gitsigns".reset_buffer_index()` to
unstage all changes in a buffer.
Added `ensure_file_in_index` to make sure files are tracked before
staging hunks.
Added `clear_status` to status, to clear only modifications (added,
changed, removed)
Added tests for `stage_buffer` and `reset_buffer_index`
Closes : #127
2021-04-06 10:51:27 +01:00
Lewis Russell
36184e5a58
Fix: Don't error on untracked files with blame
...
Fixes #123
2021-04-04 21:50:02 +01:00
Lewis Russell
654e16b6ff
Feature: Add blame info as virtual text
...
- Enable with config.current_line_blame.
- Customise formatting with config.current_line_blame_formatter.
2021-04-01 12:34:48 +01:00
Lewis Russell
eb3b172920
Tweak debug message format
2021-03-29 18:30:26 +01:00
Lewis Russell
37dda705e5
Use nvim_echo for debug_messages
2021-03-29 18:30:26 +01:00
Lewis Russell
3258ded4f5
Reworks to the testsuite
2021-03-29 16:40:55 +01:00
Lewis Russell
e00bf6d095
Stop killing the intro
...
Fixes #111
2021-03-29 11:28:11 +01:00
Lewis Russell
ec979dc5c5
Attach to all buffers on setup
2021-03-28 18:06:48 +01:00
Denys Pavlov
25cf71188a
Fix changing colorschemes breaking color highlight
...
- Update highlights when the colorscheme is changed
- Refactor existing highlight detection into a function
- Add test to prevent regression
Fixes #105
2021-03-26 15:55:21 +00:00
Lewis Russell
716b4d4bb7
Handle files with spaces
2021-03-17 14:03:03 +00:00
Lewis Russell
2f0d60f0c7
Enable internal diff and decoration provider by default
...
- Expose 'use_internal_diff' in the config and default to to true if
luajit is present.
- Change 'use_decoration_api' default to true
- Reduce default for 'update_debounce' from 200ms to 100ms.
2021-03-14 20:43:03 +00:00
Lewis Russell
b3247537f6
Allow staging hunks in files with conflicts
2021-03-13 21:46:24 +00:00
Lewis Russell
ab16e46397
Derive default highlights if they aren't defined
2021-03-13 20:08:24 +00:00
Lewis Russell
ed60dad2e4
Run testsuite on advanced config
2021-03-12 22:26:16 +00:00
Lewis Russell
36a8ff49a6
Rework testsuite
...
Each test now initialises it's own gitdir and prepopulates it.
This should make it easier to write tests with more obscure git repo
states.
2021-03-11 21:11:37 +00:00
Lewis Russell
b9c485e5b5
Emit debug messages to an internal list instead
2021-03-08 22:38:41 +00:00
Lewis Russell
dedda8cbb5
Use temp files instead of uv pipes
...
For some reason, using temp files is much quicker than UV pipes.
2021-03-07 23:53:49 +00:00
Lewis Russell
bf7c8f2077
Improve how the staged file is created
2021-03-04 23:01:07 +00:00
Lewis Russell
45504ac201
Add config.update_debounce
...
- Set default to 200ms
- Don't user 'updatetime' as nvim's default of 4s is too long.
2021-03-04 21:02:54 +00:00
Lewis Russell
81bb6d50bb
Clear signs and buffer vars on detach
...
for #56
2021-02-14 16:42:44 +00:00
Lewis Russell
b8d2fcb2b5
Show better signs for files with conflicts
...
When file has merge conflicts, during a merge or a rebase, diff against
the common ancestor (stage number 1).
2021-02-12 18:58:49 +00:00
Lewis Russell
25d5b843bd
Fix testcase
2021-02-02 20:16:51 +00:00
Lewis Russell
26f9fc5aa8
Modify how staged text files are handled
...
Resolves #47
2021-01-31 15:18:34 +00:00
Lewis Russell
895c2284c8
Refactor testsuite
2021-01-04 15:40:34 +00:00
Lewis Russell
e015b43a4f
Fix #41 again
2021-01-04 00:16:18 +00:00
Lewis Russell
b4d800cbd5
Fix #41
2021-01-03 23:47:06 +00:00
Lewis Russell
30496762b7
Better handling of new files
...
Resolves #39
2021-01-02 13:17:42 +00:00
Lewis Russell
1c3ed1bea4
Attempt to fix CI
2020-12-13 18:13:39 +00:00
Lewis Russell
ce627d53e4
Add line number highlights to signs
...
Resolves #8
2020-12-13 17:47:58 +00:00
Lewis Russell
75eaa20067
Add test for #23
2020-12-05 00:44:03 +00:00
Lewis Russell
284548d934
Fix #24
2020-12-02 23:05:43 +00:00
Lewis Russell
67c0609945
Fix indeterminism in test
2020-12-02 22:50:08 +00:00
Lewis Russell
d971e3333c
Add testing framework and tests
...
Resolves #16
2020-11-23 22:46:07 +00:00