plugins.gitblame.settings
Options provided to the require('gitblame').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
date_format = "%r";
delay = 1000;
display_virtual_text = false;
highlight_group = "Question";
ignored_filetypes = [
"lua"
"c"
];
message_template = "<summary> • <date> • <author>";
message_when_not_committed = "Oh please, commit this !";
set_extmark_options = {
priority = 7;
};
use_blame_commit_file_urls = true;
virtual_text_column = 80;
}
Declared by:
plugins.gitblame.settings.enabled
Enables the plugin on Neovim startup.
You can toggle git blame messages on/off with the :GitBlameToggle
command.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.gitblame.settings.clear_event
If you are experiencing poor performance (e.g. in particularly large projects) you can use
CursorHoldI
instead of the default CursorMovedI
autocommand to limit the frequency of
events being run.
Type: null or string or raw lua code
Default:
null
Plugin default: "CursorMovedI"
Declared by:
plugins.gitblame.settings.clipboard_register
By default the :GitBlameCopySHA
, :GitBlameCopyFileURL
and :GitBlameCopyCommitURL
commands use the +
register.
Set this value if you would like to use a different register (such as *
).
Type: null or string or raw lua code
Default:
null
Plugin default: "+"
Declared by:
plugins.gitblame.settings.date_format
The format of the date fields in message_template
.
See upstream doc for the available options.
Type: null or string or raw lua code
Default:
null
Plugin default: "%c"
Declared by:
plugins.gitblame.settings.delay
The delay in milliseconds after which the blame info will be displayed.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 250
Declared by:
plugins.gitblame.settings.display_virtual_text
If the blame message should be displayed as virtual text. You may want to disable this if you display the blame message in statusline.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.gitblame.settings.highlight_group
The highlight group for virtual text.
Type: null or string or raw lua code
Default:
null
Plugin default: "Comment"
Declared by:
plugins.gitblame.settings.ignored_filetypes
A list of filetypes for which gitblame information will not be displayed.
Type: null or (list of (string or raw lua code))
Default:
null
Plugin default: [ ]
Declared by:
plugins.gitblame.settings.message_template
The template for the blame message that will be shown.
Available options: <author>
, <committer>
, <date>
, <committer-date>
, <summary>
,
<sha>
.
Type: null or string or raw lua code
Default:
null
Plugin default: " <author> • <date> • <summary>"
Declared by:
plugins.gitblame.settings.message_when_not_committed
The blame message that will be shown when the current modification hasn’t been committed yet.
Supports the same template options as message_template
.
Type: null or string or raw lua code
Default:
null
Plugin default: " Not Committed Yet"
Declared by:
plugins.gitblame.settings.schedule_event
If you are experiencing poor performance (e.g. in particularly large projects) you can use
CursorHold
instead of the default CursorMoved
autocommand to limit the frequency of events
being run.
Type: null or string or raw lua code
Default:
null
Plugin default: "CursorMoved"
Declared by:
plugins.gitblame.settings.set_extmark_options
nvim_buf_set_extmark
is the function used for setting the virtual text.
You can view an up-to-date full list of options in the
Neovim documentation.
Warning: overwriting id
and virt_text
will break the plugin behavior.
Type: null or (attribute set of (anything or raw lua code))
Default:
null
Plugin default: { }
Declared by:
plugins.gitblame.settings.use_blame_commit_file_urls
By default the commands GitBlameOpenFileURL
and GitBlameCopyFileURL
open the current file
at latest branch commit.
If you would like to open these files at the latest blame commit (in other words, the commit
marked by the blame), set this to true.
For ranges, the blame selected will be the most recent blame from the range.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.gitblame.settings.virtual_text_column
Have the blame message start at a given column instead of EOL. If the current line is longer than the specified column value, the blame message will default to being displayed at EOL.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: null
Declared by: