Skip to content

Commit

Permalink
fix: only enable plugins that are specified in the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 28, 2021
1 parent 9997d93 commit b8ed0e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/which-key/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ M.plugins = {}
function M.setup()
for name, plugin in pairs(M.plugins) do
local opts = Config.options.plugins[name]
if opts == nil then opts = {} end
if opts == nil then opts = { enabled = false } end
if type(opts) == "boolean" then opts = { enabled = opts } end
opts.enabled = opts.enabled ~= false
if opts.enabled then
if type(plugin) == "string" then
plugin = require(plugin)
Expand Down

0 comments on commit b8ed0e8

Please sign in to comment.