Skip to content

Commit

Permalink
Move from cmp to blink
Browse files Browse the repository at this point in the history
  • Loading branch information
ldonnez committed Dec 20, 2024
1 parent e1022ae commit 8d07ff5
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 136 deletions.
11 changes: 3 additions & 8 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"blink.cmp": { "branch": "main", "commit": "ae5a4ce8f7e519e49de7ae6fcadd74547f820a52" },
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
"conform.nvim": { "branch": "master", "commit": "6239d9986f51ca93ded99ecdb1af0e287eabb651" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"emmet-vim": { "branch": "master", "commit": "6c511a8d7d2863066f32e25543e2bb99d505172c" },
Expand All @@ -19,7 +15,6 @@
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"nvim-ansible": { "branch": "main", "commit": "44dabdaa8a9193b7f564a8408ed6d7107705030a" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" },
"nvim-highlight-colors": { "branch": "main", "commit": "e967e2ba13fd4ca731b41d0e5cc1ac2edcd6e25e" },
"nvim-lspconfig": { "branch": "master", "commit": "9f2c279cf9abe584f03bfeb37c6658d68e3ff49d" },
"nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" },
Expand All @@ -31,7 +26,7 @@
"rest.nvim": { "branch": "main", "commit": "e82dc524894b1b55bcc3296d3644f15c9e06d5ad" },
"typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" },
"vim-dadbod": { "branch": "master", "commit": "f740950d0703099e0f172016f10e0e39f50fd0ba" },
"vim-dadbod-completion": { "branch": "master", "commit": "04485bfb53a629423233a4178d71cd4f8abf7406" },
"vim-dadbod-completion": { "branch": "master", "commit": "9e354e86fcc67a5ec2c104f312e374ea2f89c799" },
"vim-dadbod-ssh": { "branch": "master", "commit": "9bce775ee76c3dd6d7508dcd9eb276b36133d710" },
"vim-dadbod-ui": { "branch": "master", "commit": "0fec59e3e1e619e302198cd491b7d27f8d398b7c" },
"vim-fugitive": { "branch": "master", "commit": "fcb4db52e7f65b95705aa58f0f2df1312c1f2df2" },
Expand Down
7 changes: 1 addition & 6 deletions .config/nvim/lua/plugins/autopairs.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup()
local cmp = require("cmp")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
opts = {},
}
55 changes: 55 additions & 0 deletions .config/nvim/lua/plugins/blink.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
return {
"saghen/blink.cmp",
event = "InsertEnter",
version = "*",
dependencies = {
{
"kristijanhusak/vim-dadbod-completion",
"rafamadriz/friendly-snippets",
{ "L3MON4D3/LuaSnip", version = "*" },
},
},
opts = {
keymap = { preset = "enter" },
snippets = {
expand = function(snippet)
require("luasnip").lsp_expand(snippet)
end,
active = function(filter)
if filter and filter.direction then
return require("luasnip").jumpable(filter.direction)
end
return require("luasnip").in_snippet()
end,
jump = function(direction)
require("luasnip").jump(direction)
end,
},
sources = {
default = { "lsp", "path", "snippets", "buffer", "luasnip" },
completion = {
enabled_providers = { "lsp", "path", "snippets", "buffer", "dadbod" },
},
providers = {
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
},
},
completion = {
accept = { auto_brackets = { enabled = true } },
trigger = {
show_on_insert_on_trigger_character = false,
},
documentation = {
auto_show_delay_ms = 0,
auto_show = true,
window = {
border = vim.g.border_style,
},
},
ghost_text = {
enabled = true,
},
},
signature = { enabled = true },
},
}
4 changes: 2 additions & 2 deletions .config/nvim/lua/plugins/catppuccin.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
return {
"catppuccin/nvim",
name = "catppuccin",
version = "*",
lazy = false,
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = "frappe",
integrations = {
treesitter = true,
cmp = true,
cmp = false,
blink_cmp = true,
gitsigns = true,
telescope = false,
dashboard = false,
Expand Down
119 changes: 0 additions & 119 deletions .config/nvim/lua/plugins/cmp.lua

This file was deleted.

2 changes: 1 addition & 1 deletion .config/nvim/lua/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local global = require("global")
local keymaps = require("plugins.lsp.keymaps")
local capabilities = require("cmp_nvim_lsp").default_capabilities()

return {
{
Expand All @@ -10,6 +9,7 @@ return {
local servers = require("plugins.lsp.setup")

for server, opts in pairs(servers) do
local capabilities = require("blink.cmp").get_lsp_capabilities(opts.capabilities)
opts.capabilities = capabilities
opts.on_attach = keymaps.on_attach
require("lspconfig")[server].setup(opts)
Expand Down

0 comments on commit 8d07ff5

Please sign in to comment.