diff options
author | Daniil Rozanov <daniilrozzanov@gmail.com> | 2024-04-24 03:34:52 +0300 |
---|---|---|
committer | Daniil Rozanov <daniilrozzanov@gmail.com> | 2024-04-24 03:34:52 +0300 |
commit | f9b36bf730fda5488be87b91fd03a6f7cbf64e73 (patch) | |
tree | d8a7da573111d40c0e51c9e9954a3bb1977dd39c /lua/cmake-explorer/telescope/make_entry.lua | |
parent | 672f0d32e322b79661b5d7959887adaa9e41ad98 (diff) |
refactor: full rewrite
Diffstat (limited to 'lua/cmake-explorer/telescope/make_entry.lua')
-rw-r--r-- | lua/cmake-explorer/telescope/make_entry.lua | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/lua/cmake-explorer/telescope/make_entry.lua b/lua/cmake-explorer/telescope/make_entry.lua deleted file mode 100644 index cc919bd..0000000 --- a/lua/cmake-explorer/telescope/make_entry.lua +++ /dev/null @@ -1,57 +0,0 @@ -local make_entry = require("telescope.make_entry") -local entry_display = require("telescope.pickers.entry_display") -local config = require("cmake-explorer.config") - -local M = {} - -M.gen_from_configure = function(opts) - local project = require("cmake-explorer").project - local displayer = entry_display.create({ - separator = " ", - items = { - { width = project.display.short_len + 5 }, - { remaining = true }, - }, - }) - local make_display = function(entry) - vim.print(entry) - return displayer({ - { entry.value.display.short, "TelescopeResultsIdentifier" }, - { entry.value.display.long, "TelescopeResultsComment" }, - }) - end - return function(entry) - return make_entry.set_default_entry_mt({ - value = entry, - ordinal = table.concat(entry.short, config.variants_display.short_sep), - display = make_display, - }, opts) - end -end - -M.gen_from_build = function(opts) - local project = require("cmake-explorer").project - local displayer = entry_display.create({ - separator = " ", - items = { - { width = project.display.short_len + 5 }, - { remaining = true }, - }, - }) - local make_display = function(entry) - vim.print(entry) - return displayer({ - { entry.value.display.short, "TelescopeResultsIdentifier" }, - { entry.value.display.long, "TelescopeResultsComment" }, - }) - end - return function(entry) - return make_entry.set_default_entry_mt({ - value = entry, - ordinal = table.concat(entry.short, config.variants_display.short_sep), - display = make_display, - }, opts) - end -end - -return M |