summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua45
1 files changed, 7 insertions, 38 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index 7707122..5e7d493 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -365,47 +365,16 @@ 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)
-
- 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
- end
+function make_entry.gen_from_taglist(_)
+ local delim = string.char(9)
return function(line)
local entry = {}
- local d = make_display(line)
- entry.valid = next(d) ~= nil
- entry.display = d.display
- entry.value = d.value
- entry.ordinal = d.value
+ local tag = (line..delim):match("(.-)" .. delim)
+ entry.valid = tag ~= ""
+ entry.display = tag
+ entry.value = tag
+ entry.ordinal = tag
return entry
end