Commit Graph

151 Commits

Author SHA1 Message Date
github-actions[bot]
52f8da33cc chore(main): release 0.8.0 2024-04-17 17:19:33 +01:00
Lewis Russell
f0447b734e ci: release-please 2024-04-17 17:16:07 +01:00
Lewis Russell
c02516144a
refacto: misc refactoring (#983) 2024-04-16 17:27:19 +01:00
Lewis Russell
ec6aab13ef feat(autocmd) add GitSignsChanged
Resolves #507
2024-04-05 14:19:06 +01:00
Lewis Russell
59bdc1851c feat(nav): add nav_hunk()
- Deprecated `next_hunk()` and `prev_hunk()`.
- Can now navigate to the first/last hunk using `nav_hunk('first'|'last')`.
- Added `count` to navigation options. Defaults to `v:count1`.
- Updated recommended keymaps for navigation.
- Navigation actions now navigate to the first non-blank column.
2024-04-05 13:35:49 +01:00
Lewis Russell
3358280054 feat(blame): support extra options
Closes #953
Resolves #959
2024-04-04 14:15:15 +01:00
Lewis Russell
1389134ba9 fix: trigger GitSignsUpdate autocmd more often
Resolves #831 #832
2024-04-04 11:40:34 +01:00
Lewis Russell
224a319eda docs: add documentation for current_line_blame_formatter_opts.relative_time
Closes #912
2024-04-04 10:25:32 +01:00
Luke Franceschini
22c0ab8ec2 docs: change README.md configuration signs to match actual defaults
The default text sign for add and change is a "Box Drawings Heavy
Vertical" (U+2503). However, README.md uses "Box Drawings Light
Vertical" (U+2502) in its configuration for these signs. This
commit changes the sample configuration to match the actual defaults
used in the code, which then gets propagated to gitsigns.txt when
running gen_help.lua.

This way someone who wants to use the same symbol for untracked as add
and change, as I did, gets the same character when they copy and paste
from the documentation into their config.
2024-04-03 17:20:39 +01:00
Lewis Russell
0994d89323 feat(blame): add rev option to blame_line()
Resolves #952
2024-04-03 12:01:50 +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
a4db718c78 fix: bad deprecation message
Fixes #965
2024-04-02 09:32:53 +01:00
Lewis Russell
1bb277b41d feat(yadm): deprecate 2024-04-01 18:18:11 +01:00
hankertrix
2c2463dbd8 fix(docs)!: Use the new attached_to_untracked setting 2024-01-27 16:20:32 +00:00
Lewis Russell
fb9fd53124 fix(hl): highlights for Nvim v0.9
Resolves #939
2024-01-26 15:21:23 +00:00
Lewis Russell
590d077c55 feat!: change default of attached_to_untracked to false 2024-01-25 16:48:27 +00:00
Sebastian Lyng Johansen
300a306da9 fix: use documented highlight groups as fallback 2024-01-23 19:18:12 +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
rafascar
af0f583cd3 fix(README): add default config.current_line_blame_opts.virt_text_priority 2023-10-26 12:06:58 +01:00
Lewis Russell
d05a21795c chore: tidying 2023-10-05 14:14:33 +01:00
Lewis Russell
317c98d64c feat(diff): allow to diff against the working version
The `base` can now be set to `FILE` to diff against the working version.

Resolves #164
2023-10-02 12:14:20 +01:00
Lewis Russell
8aedc8b15a feat(diffopt): add support for whitespace flags in diffopt
Resolves #696
2023-10-02 11:22:42 +01:00
Lewis Russell
e308a4f5dd build: add doc and lint check 2023-09-23 11:13:14 +01:00
Lewis Russell
b018a2b139 perf(blame): run blame for entire file instead of per line
Previously current_line_blame would run a git-blame process per line
(via the `-L` flag) in an attempt to be more efficient. However after
some investigation it seems that running git-blame for the entire file
rarely exceeds 2x the time it takes to run for a single line, even for
large files.

This change alters current_line_blame to run git-blame for the entire
file after each buffer edit and caches that in memory. This makes the
first git-blame after an edit ~2x slower, but makes any cursor movements
after that instant.

A follow-up to this would be for current_line_blame to track buffer
updates to avoid the cache needing to be invalidated on every edit.
2023-09-22 12:24:42 +01:00
Lewis Russell
c7d963b257 docs: annotate codeblocks with lang 2023-09-22 12:24:42 +01:00
Lewis Russell
fd4d953614 docs: make gen_help.lua emmy aware 2023-07-10 13:52:01 +01:00
Lewis Russell
3a6f1e296d docs: update 2023-06-19 13:22:31 +01:00
Lewis Russell
256569c2fe feat!: remove config.keymaps 2023-06-16 16:57:41 +01:00
Lewis Russell
4d63d996b0 refactor: remove teal 2023-06-13 15:32:14 +01:00
Lewis Russell
319a248e4c feat(preview): improved version of preview_hunk_inline()
(experimental)

Uses a second buffer and a floating window in order to display syntax
highlighting in the deleted lines.

Need to set `_inline2 = true` in `setup()` to enable.
2023-04-28 11:38:38 +01:00
Lewis Russell
8ad98db42a feat: add comments to generated lua files 2023-02-16 11:09:17 +00:00
Hugo Osvaldo Barrera
f5d7b441fc fix: add space at the end of blame virtual text
When using `current_line_blame = true` with a highlight that defines a
`bg`, the virtual text has a space at the beginning but not at the end.
This looks a bit off (e.g.: the virtual text looks like a small label
with the text not properly aligned).

This is invisible when using a highlight without `bg`.

This small changes adds a space at the end so that virtual text in such
situations makes better sense visually.

Fixes: https://github.com/lewis6991/gitsigns.nvim/issues/745
2023-02-15 11:31:33 +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
414aa7bc08 fix(highlight): several fixes from last PR 2023-01-11 10:21:45 +00:00
Lewis Russell
e272fcfc99 feat!: rework highlights and document them
- Deprecated config.signs.*.[hl,numhl,linehl].

  In the future the highlight groups will be hard defined and should be
  configured directly by the user using `nvim_set_hl` or `:highlight`.

- Added documentation for all used highlights.

- Added specific highlights for 'topdelete', 'changedelete', and 'untracked'
  signs.
2023-01-10 15:07:59 +00:00
Lewis Russell
8164179143 feat: remove FFI diff implementation 2023-01-03 15:27:43 +00:00
Lewis Russell
0ca581e4f0 doc: ts syntax highlighting 2022-12-15 13:15:45 +00:00
Lewis Russell
a4e2275532 feat: add greedy option to actions 2022-11-07 13:00:46 +00:00
Lewis Russell
4313a1f9c2 feat: add b:gitsigns_line_blame
Resolves #573
2022-11-07 11:59:55 +00:00
Lewis Russell
fa1e8c589a feat(signs): different add signs for untracked files
Resolves #569
2022-11-07 10:40:47 +00:00
Lewis Russell
2b4fc5e2ae docs: update README.md 2022-11-04 10:13:48 +00:00
Lewis Russell
88d7aae293 feat(diff): support for linematch
Requires https://github.com/neovim/neovim/pull/14537
2022-11-04 10:05:20 +00:00
Lewis Russell
d3a8ba0b0d chore: update version in help 2022-10-31 16:22:11 +00:00
Lewis Russell
fe6b09be22 feat(nav): support preview_inline 2022-10-31 16:10:36 +00:00
Lewis Russell
9110ea15a1 feat(preview): add preview_hunk_inline() 2022-10-29 11:56:14 +01:00
Evgeni Chasnovski
467073b412
feat: issue GitsignsUpdate event when appropriate (#641)
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-10-07 11:43:00 +01:00
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
a0cd6ccd73 chore!: remove deprecated fields 2022-09-13 09:28:42 +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