Commit Graph

278 Commits

Author SHA1 Message Date
Lewis Russell
4b53134ce5 fix(watcher): workaround weird annoying libuv bug
Fixes #1027
2024-06-07 07:56:34 +01:00
Lewis Russell
e31d2149d9 fix: add workaround for Lazy issue 2024-06-05 10:17:10 +01:00
Lewis Russell
75dc649106 fix(attach): detach on when the buffer name changes
Fixes #1021
2024-05-29 10:00:48 +01:00
Lewis Russell
c96e3cf476 fix: scheduling in cwd watching 2024-05-28 09:41:58 +01:00
Lewis Russell
720061aa15 feat(setup)!: make setup() synchronous
Previously `setup()` was asynchronous in order to run a system command
to check the git version.

As support for v0.8 is dropped, this is no longer required.
2024-05-28 09:35:46 +01:00
Lewis Russell
c02516144a
refacto: misc refactoring (#983) 2024-04-16 17:27:19 +01:00
Lewis Russell
826ad69429 fix: do not error when cwd does not exist 2024-04-04 14:49:31 +01:00
Lewis Russell
1389134ba9 fix: trigger GitSignsUpdate autocmd more often
Resolves #831 #832
2024-04-04 11:40:34 +01:00
Lewis Russell
4e90cf984c feat(actions): add callback to async actions
- simplify async code

Fixes: #906, #766
2024-04-03 11:30:19 +01:00
Lewis Russell
3cb0f8431f fix(version): handle version checks more gracefully
- Avoid emitting errors when the version check fails.
- Put version checking into separate module.
- Pull in upstream changes for vim.system.

Fixes: #948
Closes: #960
2024-04-01 18:00:29 +01:00
Lewis Russell
fb9fd53124 fix(hl): highlights for Nvim v0.9
Resolves #939
2024-01-26 15:21:23 +00:00
martinra
3e6e91b09f
feat: configurable auto attach (#918)
* feat: configurable auto attach

* fixup! feat: configurable auto attach
2024-01-05 11:42:32 +00:00
Lewis Russell
5fc573f2d2 feat: interleave attaches on startup 2023-11-23 10:54:06 +00:00
Maurice Wangleng Tan
59bd933faa fix: gitsigns not attached due to async not returning 2023-11-23 09:33:51 +00:00
Patrick Klitzke
907ae86360 fix: update signature of setup to not allow require an argument 2023-09-12 09:30:37 +01:00
Lewis Russell
55f8fc7b13 fix: typing 2023-08-15 13:28:36 +01:00
Lewis Russell
fd4d953614 docs: make gen_help.lua emmy aware 2023-07-10 13:52:01 +01:00
Lewis Russell
0daf763ed7 chore: run through stylua 2023-07-10 11:17:40 +01:00
Lewis Russell
f1378831b1 feat(watcher): move from libuv poll to file event watcher 2023-06-19 11:22:33 +01:00
Lewis Russell
92654646f8 refactor: post teal-pocolypse cleanup
- assume vim.iconv
2023-06-14 12:02:18 +01:00
Lewis Russell
4d63d996b0 refactor: remove teal 2023-06-13 15:32:14 +01:00
Lewis Russell
f965e3bad0 perf: reduce startup time 2023-03-01 16:34:52 +00:00
Lewis Russell
f388995990 feat: add more comments to generated lua files 2023-02-16 11:22:47 +00:00
Lewis Russell
8ad98db42a feat: add comments to generated lua files 2023-02-16 11:09:17 +00:00
Sindre T. Strøm
ec4742a7ee
feat: Enable attach() to work with any buffer when given context data
* feat: Enable `attach()` to work with any buffer when given context data.

* fix(test): Pattern escape file names when matching debug messages.
2023-02-03 09:25:22 +00:00
Lewis Russell
61ed2db5c5 fix: fugitive check 2023-01-12 10:01:44 +00:00
Alfonso Ros
9950f48f7e fix: use fugitive functions to parse fugitive:// url
Fixes #686
2023-01-11 11:26:27 +00:00
Lewis Russell
ee61b323e1 feat: use vim.iconv 2022-12-16 12:40:08 +00:00
Lewis Russell
947811c7d3 refactor: move cli to separate module 2022-12-16 11:54:28 +00:00
Lewis Russell
9ff7dfb051 feat: subcmd completion for diffthis, change_base and show 2022-11-09 17:51:16 +00:00
Lewis Russell
6020b071a1 fix: completion 2022-11-09 16:29:15 +00:00
Lewis Russell
72d3c0262d fix: better argument handling of 'Gitsigns change_base' 2022-11-09 14:31:09 +00:00
Lewis Russell
233e65a521 chore: update API usage 2022-10-07 15:57:33 +01:00
Lewis Russell
acc439a485 refactor(compat): remove v0.6.0 compat 2022-10-07 15:46:32 +01:00
JafarAbdi
fe76eed870 fix: check if the buffer is still loaded before calling nvim_buf_attach 2022-10-06 10:28:47 +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
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
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
3b2e7b668c feat: add show action
Similar to diffthis, except diff mode is not enabled.
2022-05-26 11:44:35 +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
Lewis Russell
61c8398b0d test: improve unit tests 2022-05-02 12:23:51 +01:00
Lewis Russell
ec81dcc0a8 chore: formatting 2022-04-22 15:53:20 +01:00
Lewis Russell
2b7e2f4426 refactor: compat module for user commands 2022-04-22 15:02:44 +01:00
Lewis Russell
47c750f0da refactor: move more stuff into manager.tl 2022-04-22 14:59:31 +01:00
Lewis Russell
f2243468ee refactor: call word_diff in on_line (again)
This prevents running word diff on folded lines.
2022-04-22 12:40:52 +01:00
Lewis Russell
498abfa13d refactor: OOP signs 2022-04-19 16:25:32 +01:00
Lewis Russell
6527d8c847 fix(watcher): debounce
vim-grepper likes changing cwd a lot

Fixes #536
2022-04-19 12:12:48 +01:00
Lewis Russell
cd1c11cf09 feat: detect changes of g:gitsigns_head
Resolves #488
2022-04-18 11:11:25 +01:00
Lewis Russell
eb7d40f683 chore: refactor 2022-04-17 20:36:30 +01:00