Commit Graph

19 Commits

Author SHA1 Message Date
Lewis Russell
6bad541a40 fix(blame): disable caching
Has some issues. Added config._blame_cache (defaults to false) so it can
be dog-fooded
2021-12-07 17:53:58 +00:00
Lewis Russell
119ebde2de feat(current_line_blame): add caching of blame 2021-12-02 14:52:38 +00:00
Lewis Russell
ba1932ab3e feat(blame): Allow to ignore whitespace
- blame_line() now takes a table as it's first argument (instead of a
boolean) with the fields "full" and "ignore_whitespace"

- Added config.current_line_blame_opts.ignore_whitespace

Resolves #400
2021-11-16 19:21:23 +00:00
Lewis Russell
cf0ee6c2fe fix(blame): improve race condition check 2021-10-18 17:37:26 +01:00
Lewis Russell
2a1f3e6e7f fix(blame): fix possible race condition
It is possible for the buffer to change during the async function. To
avoid this, before applying the extmark, check that the cursor is in the
same position. If it is the extmark should be ok to apply and at the
very least will avoid the `line value outside range` error.

Fixes #312
2021-10-18 17:23:12 +01:00
Lewis Russell
a6d1574bab Numerous changes to setqflist
- Fix duplicate items appearing (#370)

- Make setqflist/setloclist async again

- setqflist('all') now also looks in the current working directory

- Automatically open the quickfix/location list on completion

- Make setloclist an alias of setqflist

- Refactor git.tl so now there is a separate 'Repo' object to allows us
  to create git objects for a directory.

Fixes #370
2021-09-22 13:58:09 +01:00
dialetic
790368f973 fix(autocmd): end gitsigns_blame augroup properly 2021-09-20 15:51:06 +01:00
Lewis Russell
85817528ba fix(current_line_blame): set hl_mode='combine' on extmark
Fixes #336
2021-08-24 17:19:32 +01:00
Lewis Russell
58c958ec0e Rework options for current_line_blame
- Provide b:gitsigns_blame_line_dict for blame info for current line.
  Require config.current_line_blame = true.

- Added config.current_line_blame_opts

- Added config.current_line_blame_opts.virt_text. Can be disabled to
  disable virtual text. Useful if you want b:gitsigns_blame_line_dict
  but without the blame annotation.

- Moved config.current_line_blame_delay to
  config.current_line_blame_opts.delay

- Moved config.current_line_blame_pos to
  config.current_line_blame_opts.virt_text_pos

- Added deprecation handling for old options

Resolve #199
2021-08-21 20:14:34 +01:00
Lewis Russell
b38008cf24 async: require plenary.async -> plenary.async.async
plenary.async requires several modules not used by gitsigns which is
inflating the startup time. Instead just require plenary.async.async.

On an M1 Macbook this appears to half the startup time of gitsigns.
2021-08-02 12:31:56 +01:00
Lewis Russell
d5b12da2a6 Improve docs 2021-07-06 12:30:09 +01:00
Andreas Palm
fc7c085408 current_line_blame: Add relative date 2021-07-05 18:05:23 +01:00
Lewis Russell
486f262864 Migrate to plenary async2 2021-06-21 15:25:48 +01:00
Lewis Russell
aae1c4f5b8 Clear current line blame when leaving a buffer
Resolves #225
2021-06-16 09:59:31 +01:00
Lewis Russell
c3712af768 Fix #218 2021-06-11 16:56:43 +01:00
Lewis Russell
7a9edbdcd0 Refinements to blame timeout 2021-06-11 16:16:45 +01:00
Anders Evenrud
ec378370ea Added configurable timeout for blame virtual text
Use a custom timer instead of relying on CursorHold to detach the blame
virtual text from `updatetime`.
2021-06-11 16:16:45 +01:00
Anders Evenrud
ecffcf6144 Configurable blame virtual text position 2021-06-06 10:20:27 +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