mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
Grab helptags from all paths defined in rtp
This commit is contained in:
@@ -365,38 +365,15 @@ function make_entry.gen_from_treesitter(opts)
|
||||
end
|
||||
end
|
||||
|
||||
function make_entry.gen_from_tagfile(opts)
|
||||
local help_entry, version
|
||||
local delim = string.char(7)
|
||||
function make_entry.gen_from_tagfile(_)
|
||||
local delim = string.char(9)
|
||||
|
||||
local make_display = function(line)
|
||||
help_entry = ""
|
||||
display = ""
|
||||
version = ""
|
||||
|
||||
line = line .. delim
|
||||
for section in line:gmatch("(.-)" .. delim) do
|
||||
if section:find("^vim:") == nil then
|
||||
local ver = section:match("^neovim:(.*)")
|
||||
if ver == nil then
|
||||
help_entry = section
|
||||
else
|
||||
version = ver:sub(1, -2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
result = {}
|
||||
if version ~= "" then -- some Vim only entries are unversioned
|
||||
if opts.show_version then
|
||||
result.display = string.format("%s [%s]", help_entry, version)
|
||||
else
|
||||
result.display = help_entry
|
||||
end
|
||||
result.value = help_entry
|
||||
end
|
||||
|
||||
return result
|
||||
local help_entry = (line..delim):match("(.-)" .. delim)
|
||||
return {
|
||||
display = help_entry,
|
||||
value = help_entry
|
||||
}
|
||||
end
|
||||
|
||||
return function(line)
|
||||
|
||||
Reference in New Issue
Block a user