Commit Graph

589 Commits

Author SHA1 Message Date
Sebastian Lyng Johansen
2300e4eadb
feat(preview): attach to popup if already open (#622)
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2022-09-14 11:16:08 +01:00
Lewis Russell
c8b3d79689 fix(async): handle Lua 5.2 coroutines
Fixes #624
2022-09-13 18:36:12 +01:00
Lewis Russell
e1748ae89a feat(async): simpler implementation
Use coroutine upvars to significantly simplify the implementation.
2022-09-13 09:37:57 +01:00
Lewis Russell
a0cd6ccd73 chore!: remove deprecated fields 2022-09-13 09:28:42 +01:00
Lewis Russell
d7e0bcbe45 fix(signs): make sure signs are always displayed
Fixes #614
2022-09-01 14:06:41 +01:00
Lewis Russell
f6c9596051 feat(preview): add separate highlights for hunks
Previously the hunks in the preview windows used GitSigns*Ln highlights.
These are really intended for signs when linehl is enabled and
GitSignsDeleteLn is unset by default.

This change add the highlights GitSignsAddPreview and
GitSignsDeletePreview.

Fixes #582
2022-09-01 12:16:19 +01:00
Lewis Russell
e38e6c01a9 docs: update README.md 2022-09-01 11:37:15 +01:00
Lewis Russell
ceafc3149e feat(uv): make sure all handles are closed 2022-08-31 15:56:25 +01:00
Lewis Russell
18b5523e38 build: update Teal to 0.14.1 2022-08-31 15:07:42 +01:00
Lewis Russell
1e107c91c0 fix(teal): type errors 2022-08-22 10:33:16 +01:00
Lewis Russell
79c55eb553 ci: install build deps later 2022-08-19 12:51:44 +01:00
Lewis Russell
536d6963f0 fix(ci): separate steps 2022-08-19 12:21:59 +01:00
Lewis Russell
6eb07412c2 build: use local version of tl and inspect 2022-08-19 12:20:47 +01:00
Lewis Russell
16e5ecc5f5 fix(signs): passing false to sign_define options (2) 2022-08-18 11:01:59 +01:00
Lewis Russell
f6d93f90be refactor: move ffi.d.tl to types 2022-08-17 16:58:04 +01:00
Lewis Russell
29468d89e7 fix(signs): passing false to sign_define options
Fixes #604
2022-08-13 19:04:30 +01:00
Lewis Russell
ce636faddd feat(command): use vim.ui.select
If Gitsigns is run without a subcommand, then vim.ui.select is called.

Resolves #594
2022-08-10 12:46:46 +01:00
Lewis Russell
ef8a79b2cb fix(watch): deep extend config table 2022-08-10 12:33:36 +01:00
Lewis Russell
ca6b3220b3 feat(watcher): re-add watch_gitdir.enable 2022-08-10 12:06:52 +01:00
Lewis Russell
feff9d5618 ci: use Neovim nightly instead of master
...to allow more caching
2022-08-10 12:02:52 +01:00
Lewis Russell
794ca89b30 perf: do not run word diff on folded lines 2022-08-10 11:37:57 +01:00
Lewis Russell
7639b7f741 fix(blame): prevent debounce from killing setup() 2022-08-10 11:33:21 +01:00
Lewis Russell
50e32c6309 feat: support for detached working trees
Added config.worktrees.

Array of tables with the keys 'gitdir' and 'toplevel'.

If attaching normally fails, then each entry in the table is attempted.

Example:

  worktrees = {
    {
      toplevel = vim.env.HOME,
      gitdir = vim.env.HOME .. '/projects/dotfiles/.git'
    }
  }

Resolves #397
2022-08-10 11:15:42 +01:00
Lewis Russell
9c3ca02766 feat(diffthis): 3 way diff for buffers with conflicts
If the current buffer is marked with conflicts AND the buffer's base is
unset, then diffthis will open a 3 way diff.
2022-08-01 16:21:38 +01:00
Andrew Ferrier
8b817e76b6
doc: document max_file_length fully (#597)
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-07-25 10:10:07 +01:00
Sebastian Lyng Johansen
48ac827b9f fix(hl): use NormalFloat instead of Normal 2022-07-24 13:23:50 +01:00
Lewis Russell
bb6c3bf6f5 fix(manager): adjust botline in on_win
... to account for line count of the buffer.
2022-07-08 10:33:44 +01:00
Lewis Russell
4883988cf8 fix(diffthis): apply mods properly 2022-06-23 09:28:56 +01:00
Lewis Russell
3543443eb3 fix: typo 2022-06-20 16:54:58 +01:00
Lewis Russell
fb99e93ce4 feat(command): better processing of command args
When running an action via the :Gitsigns command, the internal plumbing
can now pass the entire command context/options directly to a
specialised action command (per action) that knows how to translate
command parameters to the specific action parameters.

Example #1: `:belowright Gitsigns diffthis` now translates to
`diffthis(nil, {split='belowright'}`.

Example #2: `:6,10Gitsigns stage_hunk` now translates to
`stage_hunk({6,10})`.

Note this change reverts the behaviour of the previous commit that
respects 'splitright'

Fixes #585
2022-06-20 14:11:48 +01:00
Lewis Russell
38f56c846d feat(diffthis): respect 'splitright'
For #585
2022-06-20 10:14:24 +01:00
Lewis Russell
5ce7db00d4 fix: nil check 2022-06-17 21:54:15 +01:00
Lewis Russell
329539e061 fix(windows): convert paths with cygpath
Fixes #580
2022-06-17 09:35:13 +01:00
Joshua Rubin
c18e016864 feat(diffthis): retain cursor position from source window
Signed-off-by: Joshua Rubin <me@jawa.dev>
2022-06-09 23:22:42 +01:00
Lewis Russell
27aeb2e715 fix(blame): don't lag on folded lines 2022-05-26 12:55:53 +01:00
Lewis Russell
3b2e7b668c feat: add show action
Similar to diffthis, except diff mode is not enabled.
2022-05-26 11:44:35 +01:00
Lewis Russell
44372ff5dc fix: improve fix for #521 2022-05-24 11:45:33 +01:00
Lewis Russell
23779622ba refactor: tidy up sign api 2022-05-23 12:15:32 +01:00
Lewis Russell
ada01db9dd fix: add missing arg to reschedule updates 2022-05-22 15:04:12 +01:00
Lewis Russell
13f811e8eb fix: don't set default for GitSignsDeleteLn
Setting GitSignsDeleteLn to anything by default doesn't make much sense
since it ends up highlighting lines not related to the hunk. This is
especially confusing when show_deleted is enabled.

+ Fix incorrect docs.

Fixes #565
2022-05-22 10:15:25 +01:00
Lewis Russell
32763586ab fix: off by 1 error 2022-05-21 09:33:58 +01:00
Lewis Russell
e0d1b1a676 fix(show_deleted): don't crash on top line 2022-05-20 16:18:41 +01:00
Rafael Madriz
ffd06e36f6
doc: telescope no longer supports lsp_code_actions
Telescope removed support for `code_actions`.
See: `help telescope.changelog-1866`

Ref: https://github.com/nvim-telescope/telescope.nvim/pull/1866

Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2022-05-12 11:40:42 +01:00
Lewis Russell
aca84fd16c feat(diffthis): be graceful with bad revisions 2022-05-10 10:29:25 +01:00
Lewis Russell
0f6599720d fix(get_hunks): respect bufnr argument 2022-05-09 23:35:27 +01:00
Lewis Russell
0beb194164 fix: just another nil error 2022-05-05 13:17:41 +01:00
Lewis Russell
ef153188e8 doc: fix indent_heuristic type
Closes: #509
2022-05-02 14:56:01 +01:00
Lewis Russell
9b3100eaea fix(preview): #554 2022-05-02 14:46:25 +01:00
Lewis Russell
b290aed76f refactor: move unit tests 2022-05-02 14:42:15 +01:00
Lewis Russell
329ffe6820 feat(command): implement argparser 2022-05-02 14:16:18 +01:00