Skip to content

How to get number of plugins installed? #1209

Answered by yutkat
Maritsu asked this question in Q&A
Discussion options

You must be logged in to vote
local function get_table_size(t)
	local count = 0
	for _, __ in pairs(t) do
		count = count + 1
	end
	return count
end

get_table_size(_G.packer_plugins)

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@yutkat
Comment options

@Maritsu
Comment options

@yutkat
Comment options

@yutkat
Comment options

@Maritsu
Comment options

Answer selected by Maritsu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants