summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2022-06-12 15:09:41 +0200
committerSimon Hauser <simon.hauser@helsinki-systems.de>2022-06-30 14:01:51 +0200
commit77e2b8ceea048b42773fc454658c17448caa2a93 (patch)
treeeb93131c4367ed37ed8eafd7e58ffaf988fe666a /lua/telescope/make_entry.lua
parent838c32d6a86c8a4b8f3333f66e797f7cad2e3c1b (diff)
chore: cleanup autocmd builtin (#1947)
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua26
1 files changed, 12 insertions, 14 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index 940973b..e206fd5 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -1054,26 +1054,24 @@ function make_entry.gen_from_autocommands(_)
local make_display = function(entry)
return displayer {
- { entry.event, "vimAutoEvent" },
- { entry.group, "vimAugroup" },
- { entry.ft_pattern, "vimAutoCmdSfxList" },
- entry.command,
+ { entry.value.event, "vimAutoEvent" },
+ { entry.value.group_name, "vimAugroup" },
+ { entry.value.pattern, "vimAutoCmdSfxList" },
+ entry.value.command,
}
end
- -- TODO: <action> dump current filtered items to buffer
return function(entry)
+ local group_name = vim.F.if_nil(entry.group_name, "<anonymous>")
return {
- event = entry.event,
- group = entry.group,
- ft_pattern = entry.ft_pattern,
- command = entry.command,
- value = string.format("+%d %s", entry.source_lnum, entry.source_file),
- source_file = entry.source_file,
- source_lnum = entry.source_lnum,
+ value = {
+ event = entry.event,
+ group_name = group_name,
+ pattern = entry.pattern,
+ command = entry.command,
+ },
--
- valid = true,
- ordinal = entry.event .. " " .. entry.group .. " " .. entry.ft_pattern .. " " .. entry.command,
+ ordinal = entry.event .. " " .. group_name .. " " .. entry.pattern .. " " .. entry.command,
display = make_display,
}
end