plugins.cmp-git.settings
Options provided to the require('cmp_git').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
github = {
issues = {
filter = "all";
format = ''
function(_, issue)
local icon = ({
open = '',
closed = '',
})[string.lower(issue.state)]
return string.format('%s #%d: %s', icon, issue.number, issue.title)
end
'';
limit = 250;
sort_by = ''
function(issue)
local kind_rank = issue.pull_request and 1 or 0
local state_rank = issue.state == 'open' and 0 or 1
local age = os.difftime(os.time(), require('cmp_git.utils').parse_github_date(issue.updatedAt))
return string.format('%d%d%010d', kind_rank, state_rank, age)
end
'';
state = "all";
};
};
remotes = [
"upstream"
"origin"
"foo"
];
trigger_actions = [
{
action = ''
function(sources, trigger_char, callback, params, git_info)
return sources.git:get_commits(callback, params, trigger_char)
end
'';
debug_name = "git_commits";
trigger_character = ":";
}
{
action = ''
function(sources, trigger_char, callback, params, git_info)
return sources.github:get_issues(callback, git_info, trigger_char)
end
'';
debug_name = "github_issues";
trigger_character = "#";
}
];
}
Declared by:
plugins.cmp-git.settings.enableRemoteUrlRewrites
Whether to enable remote URL rewrites.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.cmp-git.settings.filetypes
Filetypes for which to trigger.
Type: null or (list of (string or raw lua code))
Default:
null
Plugin default:
[
"gitcommit"
"octo"
]
Declared by:
plugins.cmp-git.settings.remotes
List of git remotes.
Type: null or (list of (string or raw lua code))
Default:
null
Plugin default:
[
"upstream"
"origin"
]
Declared by: