feat: Add highlight to builtin.git_status (#388)

This commit is contained in:
Cedric M'Passi
2021-01-04 23:04:58 +01:00
committed by GitHub
parent 313ce9d0b6
commit 9503603f88
3 changed files with 45 additions and 10 deletions

View File

@@ -117,16 +117,7 @@ git.status = function(opts)
prompt_title = 'Git Status',
finder = finders.new_table {
results = vim.split(output, '\n'),
entry_maker = function(entry)
if entry == '' then return nil end
local mod, file = string.match(entry, '(..).*%s[->%s]?(.+)')
return {
value = file,
status = mod,
ordinal = entry,
display = entry,
}
end
entry_maker = make_entry.gen_from_git_status(opts)
},
previewer = previewers.git_file_diff.new(opts),
sorter = conf.file_sorter(opts),