From f078d149a1cfb9e98d9be400b6660dbaa6a58ce9 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Thu, 17 Dec 2020 15:58:38 +0100 Subject: Update autocmd, highlights and help_tags previewers (#332) Also make vim buffer line configurable --- lua/telescope/make_entry.lua | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'lua/telescope/make_entry.lua') 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 -- cgit v1.2.3