diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-06-14 21:50:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-14 21:50:46 +0200 |
| commit | 6ac5ee0854fe02d651cadf2fc97a2463ff92f322 (patch) | |
| tree | d6a7b492246db153e786762f9b0d650dc907ccf6 /lua/telescope/builtin/init.lua | |
| parent | 0c1bc129da3f684b04d72530dddaedb5255f12ef (diff) | |
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>
Diffstat (limited to 'lua/telescope/builtin/init.lua')
| -rw-r--r-- | lua/telescope/builtin/init.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index 17cdf88..016d5ec 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -145,12 +145,18 @@ builtin.git_files = require('telescope.builtin.git').files --- - Default keymaps: --- - `<cr>`: checks out the currently selected commit ---@param opts table: options to pass to the picker +---@field cwd string: specify the path of the repo builtin.git_commits = require('telescope.builtin.git').commits --- Lists commits for current buffer with diff preview ---- - Default keymaps: +--- - Default keymaps or your overriden `select_` keys: --- - `<cr>`: checks out the currently selected commit +--- - `<c-v>`: opens a diff in a vertical split +--- - `<c-x>`: opens a diff in a horizontal split +--- - `<c-t>`: opens a diff in a new tab ---@param opts table: options to pass to the picker +---@field cwd string: specify the path of the repo +---@field current_file string: specify the current file that should be used for bcommits (default: current buffer) builtin.git_bcommits = require('telescope.builtin.git').bcommits --- List branches for current directory, with output from `git log --oneline` shown in the preview window |
