* expose `cache_picker` in telescope.setup to configure caching, see `:h telescope.defaults.cache_picker`
* add builtin.resume and builtin.pickers picker
* 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 :)
* 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
- 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>
* fix: stop leaking last preview buffer
* fix: formatting for docs
* fix: async check if file is dir or not and
- fix for in_fast_event when overriding file_maker
* fix: filtering for space in keymaps and fzy
* fix: show correct result numbers when using file_ignore_patterns
* Handle early close. Caused because we actually cleaning up buffers now
* cleanup
* [docgen] Update doc/telescope.txt
Attention:
prompt_prefix will no longer add a space at the end. So if you still want a space at the end make sure your configuration has one.
The default should not be changed. So if you haven't copied prompt_prefix in your config this doesn't affect you.
Feat:
- prompt prefix does no longer always end with space
- selection_caret configurable. Default: `> `
- result_prefix configurable. Default: ` `
- more actions for git_branches
- <c-t> does track the branch
- <c-r> does rebase branch
- also added delete branch action but not configured. See readme on how to do that
Fixes:
- fix docgen ci
- Better error for lsp_workspace_symbols
- better formatting for CONTRIBUTING.md
- move from systemlist to plenary.job
- git branch now supports checkout on remote branches
* feat: Add vim docs & generators
* example of what we could start to do
* Docgen CI job
* wip
* incremental updates. soon good validation
* [Actions] Generate Documentation
skip-checks: true
* pretty cool now
* [Actions] Generate Documentation
skip-checks: true
* make sure telescope is loaded first
* Add updates. Maybe this will not delete now?
* Add defaults tags as well
* 😄
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
Co-authored-by: Github Actions <actions@github>
To revert back to bat previewers put this into your config:
file_previewer = require'telescope.previewers'.cat.new,
grep_previewer = require'telescope.previewers'.vimgrep.new,
qflist_previewer = require'telescope.previewers'.qflist.new,
* feat: replace_map
* feat: Add action_set and action_state
* fix: Move all actions.get_ to action_state.get_
* fix: replace all internal references of _goto_file_selection_edit
* feat: add some docs
* fix: lint
* feat: actions.select
* remove mentions and usage of goto_file_selection APIs
* feat: special case attach_mappings to be overridable and defaultable
* Having goto_file_selection mappings will cause a error
as well as replacing deprecated goto_file_selection methodes
For config and replacing use this instead:
- actions.select_default
- actions.select_horizonal
- actions.select_vertical
- actions.select_tab
Only replacing:
- actions.set.edit -- for replacing all select functions
* adds actions.state.select_key_to_edit_key
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
* feat: quickfix (not implemented)
* [WIP]: Wed 09 Dec 2020 11:11:30 PM EST
* somewhat working linked list impl
* getting closer
* might be working
* might be working for real
* works and implemented basic example
* dont forget to close prompt
* fix descending and add more tests
* test fixes
* fix test
* more logging
* Fix some more tests
* Fix logging messing up tests
* fix: lint
* fix: multi select stuffs
Configure preview window with:
autocmd User TelescopePreviewerLoaded setlocal wrap
autocmd User TelescopePreviewerLoaded setlocal number
file_maker example: Use regex highlighting for certain filetype like `*min.js` because they slow
down things with treesitter highlighter. Just a snippet for tests. We will do an extension :)
local previewers = require('telescope.previewers')
local putils = require('telescope.previewers.utils')
local pfiletype = require('plenary.filetype')
local _bad = { '.*%.min%.js' }
local bad_files = function(filepath)
for _, v in ipairs(_bad) do
if filepath:match(v) then
return true
end
end
return false
end
local new_maker = function(filepath, bufnr, bufname, use_ft_detect, callback)
if use_ft_detect == nil then use_ft_detect = true end
if bad_files(filepath) then
previewers.buffer_previewer_maker(filepath, bufnr, bufname, false, callback)
local ft = pfiletype.detect(filepath)
putils.regex_highlighter(bufnr, ft)
else
previewers.buffer_previewer_maker(filepath, bufnr, bufname, use_ft_detect, callback)
end
end
require('telescope').setup {
defaults = {
buffer_previewer_maker = new_maker,
}
}
- Set env vars for previewer with set_env({ key = value } fix#228)
- Set pager for git previewes (default is GIT_PAGER=less so users can scroll see #253)
- Use less for people who don't have bat but less installed
- Reset less env to only '-RS' because '-X' will break scrolling(fix#253, thanks @eth3lbert)
- Scrolling for buffer previewer(thanks @tami5 for helping)
- Also new function to create buffer previewers (which has scrolling by default). Used for tags and help_tags previewer.
- Add new setting set_env to readme
* [WIP]: Mon 28 Sep 2020 01:08:24 PM EDT
* add much much better tracking. so much less hax
* status updates, oneshot job updates, etc.
* remove temp function
* add status function
* asdfasdfasdf