Skip to content

Commit

Permalink
List nvim plugins (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
NonlinearFruit committed Jun 11, 2024
1 parent 6099855 commit 967844c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions scripts/nvim-plugins.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'
local plugins = {}
local installed_plugins = require("lazy").plugins()
for _, plugin in ipairs(installed_plugins) do
local handle = plugin[1]
local name = plugin.name or handle
local url = plugin.url

if url and url:find("https://github.com") then
local name_parts = vim.split(handle, "/")
if #name_parts == 2 then
local author = name_parts[1]

table.insert(plugins, {
name = name,
handle = handle,
url = url,
author = author,
})
end
end
end
print(vim.json.encode(plugins))
'
| do {
^nvim -u ~/.config/nvim/init.lua -l /dev/stdin
}
| complete
| get stderr
| from json
| where author != local

0 comments on commit 967844c

Please sign in to comment.