diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2025-09-29 22:37:51 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2025-09-29 22:37:51 -0500 |
commit | 0517522fc5cabb6f36f4029c7e77797ef99dbbd9 (patch) | |
tree | 0dc83f169e66241f19580c50159d08f8bff05ec7 /lua/tjk/plugins/cmp.lua | |
parent | be0f5d59252c316d626cc2fc019eea7cb9181367 (diff) | |
download | nvim-0517522fc5cabb6f36f4029c7e77797ef99dbbd9.tar.xz nvim-0517522fc5cabb6f36f4029c7e77797ef99dbbd9.zip |
replace nvim-cmp for blink.cmp and enable lsp by default
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 } |