2024-05-24 16:07:28 +03:00
|
|
|
vim.api.nvim_create_user_command("ListPlugins", function()
|
|
|
|
local plugins = require("lazy").plugins()
|
|
|
|
|
|
|
|
local f, err = io.open("plugins", "w+")
|
|
|
|
if f then
|
|
|
|
for _, v in ipairs(plugins) do
|
|
|
|
local plugin = string.format("[%s](%s)\n", v.name, v.url)
|
|
|
|
f:write(plugin)
|
|
|
|
end
|
|
|
|
|
|
|
|
f:close()
|
|
|
|
else
|
|
|
|
print("Error opening file: " .. err)
|
|
|
|
end
|
|
|
|
end, {})
|
2024-06-08 13:16:34 +03:00
|
|
|
|
|
|
|
vim.api.nvim_create_user_command("CountWords", function()
|
|
|
|
local words = vim.fn.wordcount()["words"]
|
|
|
|
print("Words: " .. words)
|
|
|
|
end, {})
|