summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/user/plugins/cmp.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/user/plugins/cmp.lua')
-rw-r--r--.config/nvim/lua/user/plugins/cmp.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/.config/nvim/lua/user/plugins/cmp.lua b/.config/nvim/lua/user/plugins/cmp.lua
new file mode 100644
index 0000000..8776310
--- /dev/null
+++ b/.config/nvim/lua/user/plugins/cmp.lua
@@ -0,0 +1,24 @@
+return {
+ 'hrsh7th/nvim-cmp',
+ event = { 'InsertEnter', 'CmdlineEnter' },
+ dependencies = {
+ 'hrsh7th/cmp-buffer',
+ 'hrsh7th/cmp-cmdline',
+ 'hrsh7th/cmp-path',
+ },
+ opts = function()
+ local cmp = require('cmp')
+
+ return {
+ mapping = cmp.mapping.preset.insert(),
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ }, {
+ { name = 'buffer' },
+ }, {
+ { name = 'path' },
+ })
+ }
+ end,
+}
+