Skip to content

Commit

Permalink
perf(dressing): lazy-load on vim.ui function call
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 2, 2023
1 parent bbd0a8a commit 4d2327d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lua/lazyvim/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ return {
{
"stevearc/dressing.nvim",
event = "VeryLazy",
config = true,
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.select(...)
end
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.input = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.input(...)
end
end,
},

-- bufferline
Expand Down

0 comments on commit 4d2327d

Please sign in to comment.