summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
authorNolan Prochnau <parvus.mortalis@gmail.com>2020-11-09 22:05:02 -0500
committerNolan Prochnau <parvus.mortalis@gmail.com>2020-11-09 22:05:02 -0500
commit48820cb1a0ba7213c08748f8c2bd04e4d0a7ed62 (patch)
treeefe644840aa6a9186b6c15a2368769a15e389acc /lua/telescope/make_entry.lua
parentd8befe243752bd1b295d84e35a53d16a0de55aa9 (diff)
Grab helptags from all paths defined in rtp
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua37
1 files changed, 7 insertions, 30 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index 7707122..c19acde 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -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)