feat: cycle previewers with commit and bcommit already using it (#528)

- new git previewers
- jump to line in bcommit previewer
- vimdiff for bcommits
- dynamic preview window titles
- more previewers documentation

Cycle previewers are not mapped yet. So you need to setup yourself:
```lua
require('telescope').setup {
  defaults = {
    mappings = {
      i = {
        ["<C-s>"] = actions.cycle_previewers_next,
        ["<C-a>"] = actions.cycle_previewers_prev,
      },
    },
  }
}
```

Co-authored-by: Thore Strassburg <thore@weilbier.net>
This commit is contained in:
Simon Hauser
2021-06-14 21:50:46 +02:00
committed by GitHub
parent 0c1bc129da
commit 6ac5ee0854
11 changed files with 566 additions and 76 deletions

View File

@@ -248,8 +248,7 @@ function make_entry.gen_from_git_stash()
end
end
function make_entry.gen_from_git_commits()
function make_entry.gen_from_git_commits(opts)
local displayer = entry_display.create {
separator = " ",
items = {
@@ -281,7 +280,8 @@ function make_entry.gen_from_git_commits()
value = sha,
ordinal = sha .. ' ' .. msg,
msg = msg,
display = make_display
display = make_display,
current_file = opts.current_file
}
end
end