mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-03 18:28:38 +00:00
ci: added picker example config to readme
This commit is contained in:
parent
c4b3aff660
commit
766fb20bd5
6 changed files with 99 additions and 17 deletions
|
@ -617,6 +617,21 @@ function M.readme(plugins, types)
|
|||
local info = M.extract(lines, { prefix = "Snacks", name = "init" })
|
||||
local readme = table.concat(vim.fn.readfile("README.md"), "\n")
|
||||
local example = table.concat(vim.fn.readfile("docs/examples/init.lua"), "\n")
|
||||
local e = M.examples("picker").general or ""
|
||||
local l = vim.split(e, "\n")
|
||||
table.remove(l)
|
||||
table.remove(l)
|
||||
local start = false
|
||||
l = vim.tbl_filter(function(line)
|
||||
if line:find("^%s*keys =") then
|
||||
start = true
|
||||
return false
|
||||
end
|
||||
return start
|
||||
end, l)
|
||||
l[1] = vim.trim(l[1])
|
||||
e = table.concat(l, "\n")
|
||||
example = example:gsub("%-%- EXTRA_KEYS", e)
|
||||
|
||||
-- config type
|
||||
lines = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue