The default filetype detection algorithm only checks the last lines of
.txt files for "ft=help" before setting the filetype to "text". Since
there was an empty line at the end, the help page was getting marked as
having filetype text first, and then help, which meant both autocmds
were triggered. This fixes that by removing the extraneous newline; note
that there is still a newline at the end of file, as is customary, and
this just removes the second, unnecessary newline.
Furthermore, this simplifies the logic for "gen_help.lua" and increases
its robustness by using the "io.lines" function rather than reading the
entire file as a string and using regular expressions to split it into
lines.
- Ensure ':Gitsigns blame' utilizes the blame cache.
- Rewrite the blame runner to process output incrementally.
- Make the blame cache more efficient.
- Move the blame processing code to a separate module.
- Also make relative time the default time format for current_line_blame_formatter
- When `current_line_blame_formatter` is passed as a function it is no
longer passed an opts argument.
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.
- 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.
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.
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.
(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