Commit Graph

463 Commits

Author SHA1 Message Date
Lewis Russell
b4548e4c60 refactor(highlights)!: rework highlights
- Added GitSigns*Inline and GitSigns*LnInline to be used with word diff
    - GitSigns*LnInline is used for word diff with config.word_diff
    - GitSigns*Inline is used for word diff in hunk previews

- Added GitSigns*VirtLn and GitSigns*VirtLnInline to be used with
  `config.show_deleted`.

- Define GitSigns highlights conditionally as opposed to only defining
  them if certain features are enabled.
2022-01-26 17:33:24 +00:00
Lewis Russell
4861666b58
doc: update README.md
Add example for on_attach for Neovim versions earlier than v0.7
2022-01-26 09:51:29 +00:00
Lewis Russell
f43cee333f refactor: remove unecessary async-void wraps 2022-01-22 15:12:01 +00:00
Lewis Russell
58e5d6d85e refactor!: deprecate config.keymaps
BREAKING CHANGE: Removed default keymaps. Instead on_attach should be
used. See README.md.
2022-01-22 09:26:27 +00:00
Lewis Russell
ddffc618ea feat(blame): enable blame cache by default
Remain as a hidden option
2022-01-20 17:32:37 +00:00
Lewis Russell
2119ddd495 chore(ci): change Neovim v0.5.0 -> v0.6.1 2022-01-20 17:26:22 +00:00
Lewis Russell
d19029adca fix(): support filepaths with unicode characters
Fixes #447
2022-01-20 17:20:43 +00:00
Michael Lingelbach
f4648dcc05 fix(): do not run fs_realpath on nil dir 2022-01-15 08:30:14 +00:00
Lewis Russell
63e8a642cf chore(): update README 2022-01-14 17:14:01 +00:00
Lewis Russell
584e1abfb9 feat(): show old version of hunks via virtual lines
Use virtual lines to show the old version of hunks inline in the buffer.

- Added config.show_deleted
- Added toggle_deleted()
2022-01-14 17:05:25 +00:00
Lewis Russell
254e09dc59 fix(blame): only set virt text if there's a result 2022-01-14 11:20:12 +00:00
Lewis Russell
2defbd7245 fix(blame): don't return empty table 2022-01-14 10:44:32 +00:00
Sergey Kuznetsov
7aad5257fa Hope the last tests fix 2022-01-11 16:16:47 +00:00
Sergey Kuznetsov
ee5e46450e Another try to fix tests 2022-01-11 16:16:47 +00:00
Sergey Kuznetsov
cf8e4df8d8 Fix tests 2022-01-11 16:16:47 +00:00
Sergey Kuznetsov
bb496d607a Move git-related code to git.tl file 2022-01-11 16:16:47 +00:00
Lewis Russell
c18fc65c77 chore(): improve type def for nvim_add_user_command 2021-12-30 11:54:10 +00:00
Joshua Wong
285622c70a fix(setup_command): Fix error when redefining Gitsigns
Replace bang with force in the command-attributes, since the latter
is equivalent to "command! Gitsigns" when using nvim_add_user_command.
Using bang without force is equivalent to "command -bang Gitsigns".

This closes #433

Signed-off-by: Joshua Wong <joshua99wong@gmail.com>
2021-12-30 08:49:58 +00:00
Lewis Russell
9a8226eccc Use nvim_add_user_command if available 2021-12-28 22:47:16 +00:00
Fabian Viöl
a451f97117 chore(make): Make FILTER overwritable 2021-12-13 12:56:01 +00:00
Fabian Viöl
9084e084f8 fix(blame_line): Do not omit carriage return
When blaming a line on a file, which as the "dos" fileformat
which is also checked in as a "dos" format including the
carriage returns, gitsigns.nvim currently reports
"Not yet commited" caused by an unsucessfull blame call
to git.

This commit fixes that behavior by appending the carriage
return lines again
2021-12-13 12:56:01 +00:00
Lewis Russell
89a2baf7cb fix(): check valid buffers after schedule
Fixes #426
2021-12-11 16:44:25 +00:00
Lewis Russell
aaf6804721 fix(subprocess): handle stderr case for git ls-files 2021-12-10 11:43:40 +00:00
Lewis Russell
caf51af051 fix(windows): Fix CRLF handling
Fixes #410
2021-12-08 22:15:22 +00:00
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
5eb87a0b05 Automate docs more
- Move function docs to comments in actions.tl
- Rewrite gen_help.lua to use a template
- Keep README and help full setup example in sync
2021-12-06 18:02:22 +00:00
Lewis Russell
fad9ae1c15 cleanup util 2021-12-06 14:20:12 +00:00
Lewis Russell
edbc935f50 feat(setqflist): Add 'open' option
If true, open the qf/loc list viewer. Defaults to true.

Resolves #415
2021-12-04 18:48:47 +00:00
Lewis Russell
f362e54e11 feat(actions): true partial hunk staging
Resolves #338
2021-12-04 18:38:52 +00:00
Lewis Russell
0ffa5a082e Change mappings to use Gitsigns command 2021-12-04 18:38:52 +00:00
Lewis Russell
119ebde2de feat(current_line_blame): add caching of blame 2021-12-02 14:52:38 +00:00
Martin Roa Villescas
9678750f20 Adds cursor position to the jump list before jump
Fixes #412
2021-12-01 10:12:54 +00:00
Lewis Russell
95845ef39c fix(blame_line): fix passing boolean as argument 2021-11-19 15:51:37 +00:00
Lewis Russell
e93e7659b6 fix(blame): fix #409
Fixes #409
2021-11-19 15:45:40 +00:00
Andreas Schneider
1805679095 fix(blame): Adapt default config to latest blame changes 2021-11-18 15:30:14 +00:00
Lewis Russell
5e49bb09f3 chore(doc): Update README with new config 2021-11-17 10:50:31 +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
3cf3c03cf8 fix(update): Fix updates from being dropped
Fixes #264
2021-11-16 16:31:47 +00:00
Jose Alvarez
bfc4543262 fix(doc): update null-ls setup instructions 2021-11-12 21:21:47 +00:00
Jose Alvarez
87b76bd815 fix(doc): fix typo 2021-11-12 21:21:47 +00:00
Jose Alvarez
037beb2bef fix(actions): correctly check if staged_diffs is empty 2021-11-12 21:21:47 +00:00
Lewis Russell
e6775fa32e
Update README.md
Tweak gitgutter comparison
2021-11-11 10:54:40 +00:00
Lewis Russell
d413673a97
Update README.md
Add a non-goal of supporting other VCS
2021-11-11 10:51:57 +00:00
Lewis Russell
61a81b0c00
Update bug_report.yaml 2021-11-04 17:06:25 +00:00
Lewis Russell
d12442a924 fix(doc): remove <buffer> as a map argument 2021-10-22 15:52:35 +01:00
Lewis Russell
a2a18c69bf fix(setqflist): prevent duplicates 2021-10-22 14:17:40 +01:00
Lewis Russell
18594357d0 doc(README): add non-goals 2021-10-18 18:01:17 +01: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
02b97995df Revert "feat(run_blame): get associated pull requests"
This reverts commit 552f114cae.

Change committed prematurely

Fixes #392
2021-10-18 13:07:55 +01:00