summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorNolan Prochnau <parvus.mortalis@gmail.com>2020-11-15 10:54:33 -0500
committerNolan Prochnau <parvus.mortalis@gmail.com>2020-11-15 10:54:33 -0500
commit1495cbec5aa9b8ee581d222b6988b30d3a71e213 (patch)
tree096257cdb0b45c779258f0ced9e8892264eb1757 /lua
parent0ccd69f5a9ab2e17e580a08983969f9d1ed5890b (diff)
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?
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/previewers.lua10
1 files changed, 8 insertions, 2 deletions
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