From 1495cbec5aa9b8ee581d222b6988b30d3a71e213 Mon Sep 17 00:00:00 2001 From: Nolan Prochnau Date: Sun, 15 Nov 2020 10:54:33 -0500 Subject: Have plugin tags previewed Still doesn't update for multiple files, but the first file in the taglist is shown, so that's a start? --- lua/telescope/previewers.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/telescope/previewers.lua b/lua/telescope/previewers.lua index 47b6e0d..9d0229d 100644 --- a/lua/telescope/previewers.lua +++ b/lua/telescope/previewers.lua @@ -423,8 +423,14 @@ previewers.help = defaulter(function(_) local tagfile = vim.fn.expand("$VIMRUNTIME") .. '/doc/tags' local old_tags = vim.o.tags - vim.o.tags = tagfile - local taglist = vim.fn.taglist('^' .. escaped .. '$', tagfile) + vim.o.tags = '' + for _,file in pairs(vim.fn.findfile('doc/tags', vim.o.runtimepath, -1)) do + vim.o.tags = vim.o.tags .. file .. ',' + end + + vim.o.tags = vim.o.tags:sub(1,-2) -- Remove trailing comma + print(vim.inspect(vim.o.tags)) + local taglist = vim.fn.taglist('^' .. escaped .. '$') vim.o.tags = old_tags if vim.tbl_isempty(taglist) then -- cgit v1.2.3