* feat: extend functionality of `entry_display.create`
- now allows passing functions or fractional values to `width` option
* refactor: cache `width` instead of results window size
* feat: use new `width` functionality for more entry makers
* expose `cache_picker` in telescope.setup to configure caching, see `:h telescope.defaults.cache_picker`
* add builtin.resume and builtin.pickers picker
* 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>
If you don't want to have a previewer disable it with `:Telescope current_buffer_fuzzy_find previewer=false`
To ignore empty lines do: `:Telescope current_buffer_fuzzy_find skip_empty_lines=true`
:Telescope man_pages sections=3 will only show man pages from section 3
:Telescope man_pages sections=1,2,3 will show man pages from section 1, 2 and 3
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,
}
}
* add vim hl_groups for autocmds finder
* spacing
* add displayer/colouring for git_commits
* LSP colouring and restore filename for workspace symbols
* resolve review issues.
* fix: handle 'show_line', 'ignore_filename', 'hide_filename'
* fix lsp workspace defaults
* allow for setting show_line when ignore filename is true
* move lsp_doc_symbol lineinfo to 2nd column
* reformat treesitter display to match LSP
* use utility functions for setting opts defaults
* add fix-me note for unlikely configuration permutation
* use hl_chars format for inline lineinfo
* add colour to buffers finder
* new display function for LSP workspace/doc symbols
* add more hl_groups and opts paramter
* use make_display() for man_pages finder.
* use make_display for registers finder and add color
* don't use quickfix make_entry() for builtin finder
* make_entry() for builtin finder
* remove debug output
* revert change to internal.builtin finder
* fix_spacing