diff options
Diffstat (limited to 'lua/tjk/plugins/cmp.lua')
-rw-r--r-- | lua/tjk/plugins/cmp.lua | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/lua/tjk/plugins/cmp.lua b/lua/tjk/plugins/cmp.lua index 346e006..3ea4026 100644 --- a/lua/tjk/plugins/cmp.lua +++ b/lua/tjk/plugins/cmp.lua @@ -1,30 +1,13 @@ return { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-path", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "ray-x/cmp-treesitter", + "saghen/blink.cmp", + opts = { + keymap = { + preset = "super-tab", + + ["<C-k>"] = { "select_prev", "fallback" }, + ["<C-j>"] = { "select_next", "fallback" }, + }, + + cmdline = { enabled = false }, }, - config = function() - local cmp = require("cmp") - cmp.setup { - sources = { - { name = "path" }, - { name = "lsp" }, - { name = "buffer" }, - { name = "treesitter" }, - }, - mapping = cmp.mapping.preset.insert { - --['<C-b>'] = cmp.mapping.scroll_docs(-4), - --['<C-f>'] = cmp.mapping.scroll_docs(4), - --['<C-Space>'] = cmp.mapping.complete(), - --['<C-e>'] = cmp.mapping.abort(), - --['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - ["<C-j>"] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert }, - ["<C-k>"] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert }, - ['<Tab>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - }, - } - end } |