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 23, 2023
1 parent 1773b89 commit a49cd5c
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions lua/astrocommunity/completion/cmp-cmdline/init.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
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({
{ name = "path" },
}, {
{
name = "cmdline",
option = {
ignore_cmds = { "Man", "!" },
{
"hrsh7th/cmp-cmdline",
opts = {
mapping = cmp_mapping.preset.cmdline(),
sources = cmp_sources({
{ name = "path" },
}, {
{
name = "cmdline",
option = {
ignore_cmds = { "Man", "!" },
},
},
},
}, {
{ name = "buffer" },
}),
}, {
{ name = "buffer" },
}),
},
config = function(_, opts) require("cmp").setup.cmdline(":", opts) end,
},
{
"nvim-cmp",
event = { "CmdlineEnter" },
dependencies = {
"cmp-cmdline",
},
},
config = function(_, opts) require("cmp").setup.cmdline(":", opts) end,
}

0 comments on commit a49cd5c

Please sign in to comment.