mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-10-24 05:23:19 +00:00
feat(nvim): phase 3 — replace nvim-cmp with blink.cmp and telescope with snacks.picker
Swap the completion engine to blink.cmp v1.x, dropping nvim-cmp, its eight cmp-* sources, lspkind, and LuaSnip. Swap the picker to snacks.picker, removing telescope.nvim and six telescope extensions. LSP capabilities now sourced from blink.cmp; LSP navigation keymaps and the colorscheme/keymaps/todo pickers move to Snacks.picker. friendly-snippets is preserved as blink's snippet source.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
-- Setup language servers.
|
||||
local conform = require("conform")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
@@ -17,13 +16,13 @@ local on_attach = function(client, bufnr)
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
|
||||
opts.desc = "Go to definitions"
|
||||
vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts)
|
||||
vim.keymap.set("n", "gd", function() Snacks.picker.lsp_definitions() end, opts)
|
||||
|
||||
opts.desc = "Show documentation for what is under cursor"
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
|
||||
opts.desc = "Show LSP Implementation"
|
||||
vim.keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts)
|
||||
vim.keymap.set("n", "gi", function() Snacks.picker.lsp_implementations() end, opts)
|
||||
|
||||
opts.desc = "Get Help"
|
||||
vim.keymap.set("n", "<leader>gh", vim.lsp.buf.signature_help, opts)
|
||||
@@ -35,7 +34,7 @@ local on_attach = function(client, bufnr)
|
||||
-- end, opts)
|
||||
|
||||
opts.desc = "Show LSP type definitions"
|
||||
vim.keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts)
|
||||
vim.keymap.set("n", "gt", function() Snacks.picker.lsp_type_definitions() end, opts)
|
||||
|
||||
opts.desc = "Smart rename"
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
@@ -44,7 +43,7 @@ local on_attach = function(client, bufnr)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
|
||||
opts.desc = "Show LSP references"
|
||||
vim.keymap.set("n", "<leader>cr", "<cmd>Telescope lsp_references<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>cr", function() Snacks.picker.lsp_references() end, opts)
|
||||
|
||||
opts.desc = "Format File"
|
||||
vim.keymap.set({ "n", "v" }, "<leader>f", function()
|
||||
@@ -67,7 +66,7 @@ local on_attach = function(client, bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
|
||||
-- Configure diagnostic signs (Neovim 0.10+ API; required in 0.12)
|
||||
vim.diagnostic.config({
|
||||
|
||||
Reference in New Issue
Block a user