(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.
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
- 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.
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
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
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
- When running diffthis (or vim-fugitive's Gdiffsplit), hunk operations
to the index will now update the diff buffer.
- Similar to vim-fugitive's Gdiffsplit, buffers of a file in the git
index can now be edited. When the buffer is written, it updates the
git index accordingly. Likewise the index buffer can also be reloaded
(via 'edit').
- Moved all diffthis code to a separate module.
Fixes#501
- config.current_line_blame_formatter can now be specified as a format
string.
- changed default of `config.current_line_blame_formatter` to
'<author>, <author_time:%R> - <summary>' which is equivalent to the
previous function default.
- deprecated config.current_line_blame_formatter_opts
Resolves#291
- 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.
- 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
If installed and enabled (via `config.trouble`; defaults to true if
installed), `:Gitsigns setqflist` and `:Gitsigns seqloclist` will
open Trouble instead of Neovim's built-in quickfix or location list
windows.