diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2020-12-17 15:58:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-17 15:58:38 +0100 |
| commit | f078d149a1cfb9e98d9be400b6660dbaa6a58ce9 (patch) | |
| tree | eec5f8ee58e6939ebd5331c3e0b03598731a079f /lua/telescope/make_entry.lua | |
| parent | e5233f39c50b723c562e6a6390ecf46b0237be68 (diff) | |
Update autocmd, highlights and help_tags previewers (#332)
Also make vim buffer line configurable
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 04d5f3d..5d31632 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -391,21 +391,6 @@ function make_entry.gen_from_treesitter(opts) end end -function make_entry.gen_from_taglist(_) - local delim = string.char(9) - - return function(line) - local entry = {} - local tag = (line..delim):match("(.-)" .. delim) - entry.valid = tag ~= "" - entry.display = tag - entry.value = tag - entry.ordinal = tag - - return entry - end -end - function make_entry.gen_from_packages(opts) opts = opts or {} @@ -492,23 +477,11 @@ function make_entry.gen_from_highlights() return display, { { { 0, #display }, display } } end - local preview_command = function(entry, bufnr) - local hl = entry.value - vim.api.nvim_buf_set_option(bufnr, 'filetype', 'vim') - local output = vim.split(vim.fn.execute('hi ' .. hl), '\n') - local start = string.find(output[2], 'xxx', 1, true) - vim.api.nvim_buf_set_lines(bufnr, 0, -1, true, output) - vim.api.nvim_buf_add_highlight(bufnr, -1, hl, 1, start - 1, start + 2) - end - return function(entry) return { value = entry, display = make_display, ordinal = entry, - - preview_command = preview_command - } end end |
