* feat: add `shorten_len` option for path shortening
- adds option to configure the length of shortened parts of filenames
- only affects paths when "shorten" is in `path_display`
* chore: revert rebase for `path.lua` to 876bed9
* refactor: replace `shorten_len` with the `shorten` key in `path_display`
- also deprecates `utils.path_shorten` and passes straight to `plenary`s `Path:shorten`
* feat: allow `path_display` to handle table keys, as well as strings
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
* 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