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 | |
parent | be0f5d59252c316d626cc2fc019eea7cb9181367 (diff) | |
download | nvim-0517522fc5cabb6f36f4029c7e77797ef99dbbd9.tar.xz nvim-0517522fc5cabb6f36f4029c7e77797ef99dbbd9.zip |
replace nvim-cmp for blink.cmp and enable lsp by default
-rw-r--r-- | lazy-lock.json | 6 | ||||
-rw-r--r-- | lua/tjk/plugins/cmp.lua | 37 | ||||
-rw-r--r-- | lua/tjk/plugins/lsp.lua | 4 |
3 files changed, 13 insertions, 34 deletions
diff --git a/lazy-lock.json b/lazy-lock.json index 9cf3ffc..2613d48 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,15 +1,11 @@ { "autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, - "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, - "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, + "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "minitab.nvim": { "branch": "master", "commit": "f6183e8cb6f408e54dd5d1d13c0075376655a3ec" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, 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 } diff --git a/lua/tjk/plugins/lsp.lua b/lua/tjk/plugins/lsp.lua index a23f7ef..5a73721 100644 --- a/lua/tjk/plugins/lsp.lua +++ b/lua/tjk/plugins/lsp.lua @@ -1,9 +1,9 @@ return { "neovim/nvim-lspconfig", - enabled = false, dependencies = { "williamboman/mason.nvim", -- install lsp's "williamboman/mason-lspconfig.nvim", + "saghen/blink.cmp", -- to ensure lspconfig can get completion capabilities }, config = function() require("mason").setup() @@ -11,7 +11,7 @@ return { local lspconfig = require("lspconfig") lspconfig.pylsp.setup { autostart = false, - capabilities = require("cmp_nvim_lsp").default_capabilities() + capabilities = require("blink.cmp").get_lsp_capabilities() } end } |