Skip to content

Commit

Permalink
perf(cmp-cmdline): lazy load
Browse files Browse the repository at this point in the history
  • Loading branch information
meijieru committed Aug 24, 2023
1 parent 6ad36ac commit 331f346
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lua/astrocommunity/completion/cmp-cmdline/init.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
local cmp = require "cmp"
local cmp_mapping = require "cmp.config.mapping"
local cmp_sources = require "cmp.config.sources"

return {
"hrsh7th/cmp-cmdline",
lazy = false,
opts = {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
mapping = cmp_mapping.preset.cmdline(),
sources = cmp_sources({
{ name = "path" },
}, {
{
Expand All @@ -19,4 +19,8 @@ return {
}),
},
config = function(_, opts) require("cmp").setup.cmdline(":", opts) end,
dependencies = {
"nvim-cmp",
},
event = { "CmdlineEnter" },
}

0 comments on commit 331f346

Please sign in to comment.