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
* feat: new builtin - Autocommands finder
* fix: remove decorators to avoid confusion.
* make preview split same hl-group as border
* use highlight instead of marker character for preview selection hl
Still has a bunch of improvements that can be done, but wanted to merge in some of the related changes.
* options parser
* wip: vimoptions finder
* feat: pre-populate ex-command line with `:set foo=`
* use options current value when populating command line
* fix: use result.raw_value to store original option value
* .
* options: Continue work on option finder
* [WIP]: Tue 27 Oct 2020 10:34:09 PM EDT
* [WIP]: Mon 02 Nov 2020 08:20:13 PM EST
* [WIP]: Mon 02 Nov 2020 09:04:23 PM EST
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
First edition. Sometimes weird things can happen with the previewer, but I think I got it 99% working.
* feat: Manpages finder (output of apropos)
* fixup: Add previewer and fix comments
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
Instead of storing everything in key / value pair hashes, we store as much as possible in an array and then reference the items in the array using metatables.
This provides us with a much lower memory footprint and just one level of table lookup indirection (so I think the speed will not be noticeably different)