feat(picker): added opts.rtp (bool) to find/grep over files in the rtp. See #680

This commit is contained in:
Folke Lemaitre 2025-01-23 13:03:15 +01:00
parent 3fb111090e
commit 9d5d3bdb17
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 26 additions and 6 deletions

View file

@ -198,6 +198,16 @@ function M.title(str)
)
end
function M.rtp()
local ret = {} ---@type string[]
vim.list_extend(ret, vim.api.nvim_get_runtime_file("", true))
if package.loaded.lazy then
local extra = require("lazy.core.util").get_unloaded_rtp("")
vim.list_extend(ret, extra)
end
return ret
end
---@param str string
---@return string text, string[] args
function M.parse(str)