diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 0457229..f2cb44a 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,9 +1,6 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "blink.cmp": { "branch": "main", "commit": "506ea74e53a825cc6efd40a46c4129576409e440" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "fzf-lua": { "branch": "main", "commit": "8f9c3a2e308755c25630087f3c5d35786803cfd0" }, "grug-far.nvim": { "branch": "main", "commit": "04b483d0596c41c94607f78b8f3374e5c40f32f2" }, @@ -15,7 +12,6 @@ "mini.diff": { "branch": "main", "commit": "d58f9cb13400aedc5b5a0ef70fcdf31871ba2ee6" }, "mini.surround": { "branch": "main", "commit": "57caca9525cec0ea771a67326b0ee637d056078a" }, "nvim-autopairs": { "branch": "master", "commit": "48ca9aaee733911424646cb1605f27bc01dedbe3" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lspconfig": { "branch": "master", "commit": "a67bc39aaa4f1e13212c5022a561120846eaef27" }, "nvim-treesitter": { "branch": "master", "commit": "047ce49ccf9a2dce22e1cf3843bef3b5682a8144" }, "oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" }, diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 8aa1215..8a6e3ac 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -117,17 +117,11 @@ return require("lazy").setup({ "https://github.com/VonHeikemen/lsp-zero.nvim", dependencies = { "https://github.com/neovim/nvim-lspconfig", - "https://github.com/hrsh7th/nvim-cmp", - "https://github.com/hrsh7th/cmp-nvim-lsp", - "https://github.com/hrsh7th/cmp-path", - "https://github.com/hrsh7th/cmp-buffer", - "https://github.com/L3MON4D3/LuaSnip", + "https://github.com/saghen/blink.cmp", }, event = "VeryLazy", config = function() local lsp_zero = require("lsp-zero") - local cmp = require("cmp") - local cmp_action = lsp_zero.cmp_action() lsp_zero.setup_servers({ -- Requires language servers to be already installed @@ -143,17 +137,17 @@ return require("lazy").setup({ -- HACK manually start LSP server after lazy load vim.cmd("filetype detect") - cmp.setup({ - sources = { - { name = "nvim_lsp" }, - { name = "path" }, - { name = "buffer" }, + require("blink.cmp").setup({ + accept = { + auto_brackets = { + enabled = true, + }, + }, + keymap = { + accept = '', + select_next = '', + select_prev = '', }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.confirm(), - [""] = cmp_action.luasnip_supertab(), - [""] = cmp_action.luasnip_shift_supertab(), - }), }) lsp_zero.on_attach(function(client, bufnr)