* Added closest selection_strategy to use default_selection_index initially but prefer highest ranked match when prompt not empty
* Updated supporting documentation to include selection_strategy
* fix: prevent error when overriding tables with numbers
Fixes#944
- refactor `config.smarter_depth_2_extend`
- use `config.smarter_depth_2_extend` for setting `layout_config` in `Picker:new`
* test: check that can override a table with a number for layout configuration
* fix: display issues in `:Telescope registers`
- Problems occured when a register contained newlines
- Caused issues in `Picker:set_selection`
- Couldn't move selection when a register with newlines was selected
- 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",
}
}
}
}
}
```
`string.find()` is defaulting to _pattern_ matching (rather than string
literal matching). If you are using the `only_cwd` command in a
directory with a `-` (for example) the option fails to work.
This fix asks `string.find()` to interpret the arguments as literal
strings rather than patterns.
Reference: https://stackoverflow.com/a/15258515/181902
There's a slight lag on the first preview loading (during preview buffer creation).
It is not visible the next time user chooses a file for preview because scratch buffer
for the file already exists. This lag *and* setting preview window to display the newly
created buffer before its fully initialized causes a brief flash of blank terminal background.
This change delays setting preview window to display the new preview buffer and consequently
eliminates the flash. It should improve user experience since flickering can be distracting.
* 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
* fix: use treesitter language name if available
This will fix the problem where the filetype is different than the
treesitter lang name. Eg., filetyep -> "sh", langname -> "bash"
* refactor: use treesitter only if the query object is available
* refactor: ok -> parser_ok ;)
* fix checking for git dir in a bare repo
* revert last change and look for worktree
* fix lint error
* [docgen] Update doc/telescope.txt
skip-checks: true
Co-authored-by: Brian Ryall <brian.ryall@udri.udayton.edu>
Co-authored-by: Github Actions <actions@github>
* fix: support multiple clients in lsp code actions
* no goto
* reduce diff a bit
* use displayer, also include lsp client name for each entry
* review comments