Grab helptags from all paths defined in rtp

This commit is contained in:
Nolan Prochnau
2020-11-09 22:05:02 -05:00
parent d8befe2437
commit 48820cb1a0
2 changed files with 14 additions and 39 deletions
+7 -9
View File
@@ -486,16 +486,14 @@ end
builtin.help_tags = function(opts)
opts = opts or {}
local sourced_file = require('plenary.debug_utils').sourced_filepath()
local base_directory = vim.fn.fnamemodify(sourced_file, ":h:h:h")
local file = base_directory .. "/data/help/tags"
local tags = {}
local f = assert(io.open(file, "rb"))
for line in f:lines() do
table.insert(tags, line)
end
f:close()
for _, file in pairs(vim.fn.findfile('doc/tags', vim.o.runtimepath, -1)) do
local f = assert(io.open(file, "rb"))
for line in f:lines() do
table.insert(tags, line)
end
f:close()
end
pickers.new(opts, {
prompt_title = 'Help',