From 80a781beea32e7f65a555d58f047517cd9e56f94 Mon Sep 17 00:00:00 2001 From: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Date: Sun, 9 Jul 2023 12:23:37 +0200 Subject: [PATCH] feat(completion): Add cmp-cmdline (#383) --- .../completion/cmp-cmdline/README.md | 5 +++++ .../completion/cmp-cmdline/init.lua | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 lua/astrocommunity/completion/cmp-cmdline/README.md create mode 100644 lua/astrocommunity/completion/cmp-cmdline/init.lua diff --git a/lua/astrocommunity/completion/cmp-cmdline/README.md b/lua/astrocommunity/completion/cmp-cmdline/README.md new file mode 100644 index 000000000..aee2395ff --- /dev/null +++ b/lua/astrocommunity/completion/cmp-cmdline/README.md @@ -0,0 +1,5 @@ +# Cmp Cmd + +nvim-cmp source for vim's cmdline. + +**Repository:** diff --git a/lua/astrocommunity/completion/cmp-cmdline/init.lua b/lua/astrocommunity/completion/cmp-cmdline/init.lua new file mode 100644 index 000000000..646937464 --- /dev/null +++ b/lua/astrocommunity/completion/cmp-cmdline/init.lua @@ -0,0 +1,22 @@ +local cmp = require "cmp" + +return { + "hrsh7th/cmp-cmdline", + lazy = false, + opts = { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" }, + }, { + { + name = "cmdline", + option = { + ignore_cmds = { "Man", "!" }, + }, + }, + }, { + { name = "buffer" }, + }), + }, + config = function(_, opts) require("cmp").setup.cmdline(":", opts) end, +}