diff options
| author | steven <61105469+stevenp2@users.noreply.github.com> | 2022-07-23 02:16:17 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-22 18:16:17 +0200 |
| commit | b5833a682c511885887373aad76272ad70f7b3c2 (patch) | |
| tree | 1aa478e2dc3b4a3be75fcbba8d5515bad8521098 /lua/telescope | |
| parent | 737f8cd6b5a9b987c5fa91aacd477358191e1fb8 (diff) | |
fix: move the moon behind show_moon option and update documentation (#2072) (#2079)
Diffstat (limited to 'lua/telescope')
| -rw-r--r-- | lua/telescope/builtin/__internal.lua | 3 | ||||
| -rw-r--r-- | lua/telescope/builtin/init.lua | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lua/telescope/builtin/__internal.lua b/lua/telescope/builtin/__internal.lua index 5012127..b9626bb 100644 --- a/lua/telescope/builtin/__internal.lua +++ b/lua/telescope/builtin/__internal.lua @@ -209,6 +209,7 @@ end internal.planets = function(opts) local show_pluto = opts.show_pluto or false + local show_moon = opts.show_moon or false local sourced_file = require("plenary.debug_utils").sourced_filepath() local base_directory = vim.fn.fnamemodify(sourced_file, ":h:h:h:h") @@ -216,7 +217,7 @@ internal.planets = function(opts) local globbed_files = vim.fn.globpath(base_directory .. "/data/memes/planets/", "*", true, true) local acceptable_files = {} for _, v in ipairs(globbed_files) do - if show_pluto or not v:find "pluto" then + if (show_pluto or not v:find "pluto") and (show_moon or not v:find "moon") then table.insert(acceptable_files, vim.fn.fnamemodify(v, ":t")) end end diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index 74323d4..3061358 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -228,6 +228,7 @@ builtin.pickers = require_on_exported_call("telescope.builtin.__internal").picke --- Use the telescope... ---@param opts table: options to pass to the picker ---@field show_pluto boolean: we love pluto (default: false, because its a hidden feature) +---@field show_moon boolean: we love the moon (default: false, because its a hidden feature) builtin.planets = require_on_exported_call("telescope.builtin.__internal").planets --- Lists symbols inside of `data/telescope-sources/*.json` found in your runtime path |
