Skip to content

Commit 37d8f63

Browse files
committed
fix(store): generate config
1 parent 5314294 commit 37d8f63

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lua/fzf-lua-extra/providers/store.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ local p_do = function(cb)
88
local plugin = {}
99
plugin.url = assert(FzfLua.get_last_query())
1010
plugin.full_name = plugin.url:gsub('https?://github.com/', '')
11-
plugin._config = string.format('return { %q, opts = {} }', plugin.full_name)
1211
local bs_parts = vim.split(plugin.full_name, '/', { trimempty = true })
1312
plugin.name = bs_parts[#bs_parts]
1413
cb(plugin, opts)
@@ -133,7 +132,11 @@ local __DEFAULT__ = {
133132
local filepath = plugins_folder .. '/' .. (normname(p.name) .. '.lua')
134133
local res = utils.run(cmd, opts).stdout or ''
135134
local items = vim.json.decode(res).items
136-
write_conf({ config = p._config or items[p.full_name], filepath = filepath, repo = p })
135+
write_conf({
136+
config = items[p.full_name] or ('return { %q, opts = {} }'):format(p.full_name),
137+
filepath = filepath,
138+
repo = p,
139+
})
137140
end)
138141
end
139142
end),

0 commit comments

Comments
 (0)