* fix: finish docs and remove mistakes from merge
* fix: change order of `popup` changes based on type of change
- removes "flash" issue where popups don't update in sync
* feat: add hide / unhide preview or results and prompt
* fix edit actions while only preview window is active
* add option to start telescope without previewer -> "disable_previewer_at_startup"
* remove hide / unhide prompt and resutls, improve hide / unhide preview
* fix tests - check if popup window should be created with borders - popup.create does not support setting borderhighlight and border=false
* allow toggle preview even if preview is set to false
* reuse recalculate_layout in hide / unhide preview
* add docs to toggle preview
* check if preview window is valid window
* remove unnecessary changes
* cleanup, remove unnecessary changes
* close all previewers, refactor toggle preview code
[docgen] Update doc/telescope.txt
skip-checks: true
* fix: always show error message when nothing is selected
This continues the fixes done in 4816a27d76 (ref #1283)
* Use correct variable name (selection) and add one more nil check
* Fix indentation
When opening a file under swap from the "fd" finder results an error was
printed after the file was opened, wrapping the call to "vim.cmd" in a
pcall avoids the error.
* Add default mappings `<C-/>`and `?` for insert and normal mode, respectively, to show registered keymappings (`actions.which_key`) attached to prompt buffer
* expose `cache_picker` in telescope.setup to configure caching, see `:h telescope.defaults.cache_picker`
* add builtin.resume and builtin.pickers picker
history is enabled on default but cycle_history_next and cycle_history_prev is not mapped yet
Example:
require('telescope').setup {
defaults = {
mappings = {
i = {
["<C-Down>"] = require('telescope.actions').cycle_history_next,
["<C-Up>"] = require('telescope.actions').cycle_history_prev,
}
}
}
}
For more information :help telescope.defaults.history
big thanks to clason and all other testers :)
- add option `include_extensions` which defaults to `false`
- if `include_extensions` is `true` then add functions from extensions to results
- update `actions.run_builtin` to check if extension function provided
- 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 action is not mapped but you can do it yourself in your telescope setup call
Example config:
```lua
require("telescope").setup {
pickers = {
buffers = {
mappings = {
i = {
["<c-d>"] = "delete_buffer",
}
}
}
}
}
```
* create new action: git switch
If the branch already exists in local, switch to that.
If the branch is only in remote, create new branch tracking remote and switch to new one.
* fix a point of review
* fix a point of review: map to git-switch action
* Revert "fix a point of review"
This reverts commit 017ce424a3adfe1b3712a421385cfc3f4258a0fb.
* undocument header comment
* added git action for creating and checking out a new branch, added basic docstrings for git actions
* Added confirmation for creation of new branch, changed default mapping
to <c-u>
* Switched back to `<c-a>` default mapping for now
* fix: related to #13 telescope-project, enter insert mode on prompt close
* fix: related to #13 telescope-project, enter insert mode on prompt close
* revert changes made in error
* fix PR issue
* fix: undefined variable do_close
* use action_state as actions is deprecated
* [docgen] Update doc/telescope.txt
skip-checks: true
Co-authored-by: Github Actions <actions@github>