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?
This commit is contained in:
Nolan Prochnau
2020-11-15 10:54:33 -05:00
parent 0ccd69f5a9
commit 1495cbec5a

View File

@@ -423,8 +423,14 @@ previewers.help = defaulter(function(_)
local tagfile = vim.fn.expand("$VIMRUNTIME") .. '/doc/tags' local tagfile = vim.fn.expand("$VIMRUNTIME") .. '/doc/tags'
local old_tags = vim.o.tags local old_tags = vim.o.tags
vim.o.tags = tagfile vim.o.tags = ''
local taglist = vim.fn.taglist('^' .. escaped .. '$', tagfile) 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 vim.o.tags = old_tags
if vim.tbl_isempty(taglist) then if vim.tbl_isempty(taglist) then